Posts Tagged ‘solaris’

Using VI Editor (Visual Editor)

January 17th, 2021, posted in Linux OS, Solaris
Share

VI Editor (Visual Editor)


You must be familiar with notepad in windows which is used to edit a file. Like-wise we have VI editor in UNIX, LINUX & SOLARIS OS used widely for editing files.
However, Unlike notepad it is little tricky to use. I wish the VI editor would have been developed by Bill gates rather than Bill Joy.
Anyways, guys we don’t have any other option rather than getting aware of all these commands so that we become proficient in working with the VI Editor.

Understanding different modes in VI Editor:
There are three different modes in VI editors:
1. Command Mode
2. Insert/input Mode
3. EX mode

By default when you will open the VI editor, it will be in command mode. In the following sections we will see:
1. How to switch from one mode to another?
2. What are the different VI Commands that we can use in these modes.


Command Mode : 
This is default mode of the VI editor. In this mode we can delete, change, copy and move text.

VI Navigation Commands:

Key
Use
j(or down arrow) To move the cursor to the next line (move down) 
k(or up arrow) To move the cursor to the previous line (move up) 
h(or left arrow)  To move left one character
l(or right arrow) To move right one character
H To move the cursor to current page beginning of the first line.
G To move the cursor to current page beginning of the last line.
b To move the cursor previous word first character
e To move the cursor next word last character
w To move the cursor to next word first character
^ Go to beginning of line 
0 Go to beginning of line
$ Go to the end of the line
CTRL+F forward 1 screen
CTRL+B backward 1 screen
CTRL+D down (forward) 1/2 screen
CTRL+U up (backward) 1/2 screen

Copy & Paste:

Key Use
y+w  To copy rest of the word from current cursor position. 
n+y+w  To copy n number of words from the current cursor position.
y+y To copy a line
n+y+y To copy n lines
p(lowerCase) To paste a copied words/lines after the current position of the cursor
P(uppercase) To paste a copied words/lines before  the current position of the cursor

Deletion:

Key
Use
x deletes a single character 
n+X  To delete n number of characters from the cursor position in a line.
d+w To delete rest of a word from current cursor position
n+d+w  To delete n  number of words from the cursor position in a line
d$ Delete rest of line from current cursor position
D Delete rest of line from current cursor position
d+d To delete an entire line
n+d+d To delete n lines from current cursor position


Few More Important Command Mode VI commands:

Key
Use
u Undo changes (only one time) 
U Undo all changes to the current line 
~ To change the case of the letter
ZZ Saves the changes and quits the vi editor 

Input or Insert Mode: In this mode we can insert text into the file. We can enter the insert mode by pressing following keys in command mode:

Key
Use
i Inserts the text before the cursor 
I Inserts the text at the beginning of the line 
o Opens a new blank line below the cursor
O Opens a new blank line above the cursor
a Appends text after the cursor
A Appends the text after the line
r replace the single character with another character 
R replace a entire line
Esc To return to command mode

 Last line mode or Collan Mode : This is used for advance editing commands. To access the last line mode enter “:” while in command mode.

Key
Use
: To get to collan mode(This need to be entered every time a user wants to use collan mode command)
:+set nu Shows line numbers
:+set nonu Hides line numbers
:+enter+n  Moves the cursor to the n line
:+/keyword  To move the cursor to the line starting with the specific keyword
:+n+d Deletes nth line
:+5,10d Delete line from 5th line to 10th line
:+7 co 32 Copies 7th line and paste in 32nd line
:+10,20 co 35 Copies lines from 10th line to 20th line and paste it from 35th line

:+%s/old_text/new_text/g  Searches old string and replaces with the new string
:+q+! Quits vi editor without saving
:+w Saves the file with changes by writing to the disk
:+w+q Save and exit the vi editor
:+w+q+! Save and quit the VI Editor forcefully.
1,$s/$/” -type=Text_to_be_appended Append text at the end of the line

Using VI editor Command:

vi options <file name>
The options are discussed below:
-r : To recover a file from system crash while editing.
-R : To open a file in read only mode.

 

Viewing Files in Read Only Mode:
view <file name>
This is also used to open the file in read only mode. To exit type ‘:q‘ command.

 

Automatic Customization of a VI session:
1. Create a file in the user’s home directory with the name .exrc
2. enter the set variables without preceding colon
3. Enter each command in one line.
VI reads the .exrc file each time the user opens the vi session.
Example:
#cd ~
#touch .exrc
#echo “set nu”>.exrc
#cat .exrc
set nu
#
In the above example we have used set line number command. So whenever the user opens the vi session, line number is displayed.
I know its nearly impossible to keep all the above commands in mind, even I don’t have, but as we keep practicing, we will be knowing most of them.
Share

Working With Directories And Files in Solaris

January 10th, 2021, posted in Solaris
Share

Working with Files and DirectoriesAdd A User From The Command Line In Solaris,Add A User From The Command Line In Solaris 10,Add A User From The Command Line, In Solaris10 ,Add A User ,The Command Line In Solaris10,The Command Line In Solaris,solaris 10,

Working with Files and Directories is very basic thing which we dont want to miss while learning Solaris 10. Lets check few very basic commands.

To display the current working directory:

pwd command: It displays the current working directory.

example:
#pwd
/export/home/immam

To display contents of a  directory:

ls command (Listing Command): It displays all files and directories under the specified directory.
Syntax: ls -options <DirName>|<FileName>
The options are discussed as follows:

Option
Description
p It lists all the files & directories. The directory names are succeeded by the symbol ‘/’
F It lists all files along with their type. The symbols ‘/’, ‘*’, (None), ‘@’ at the end of file name represents directory, executable, Plain text or ASCII file & symbolic link respectively
a It lists all the files & directories name including hidden files
l It lists detailed information about files & directories
t It displays all the files & directories in descending order of their modified time.
r It displays all the files & directories in reverse alphabetical order
R It displays all the files & directories & sub-directories in recursive order
i It displays the inode number of  files & directories
tr It displays all the files & directories in the ascending order of their last modified date
Analysis of output of ls -l command:
ls -l → It list all the files and directories long list with the permission and other information. The output looks as follows:
FileType & Permissions LinkCount UID GID Size Last ModifiedDate & ModifiedTime <File/Directory Name>
Following table explains the output:
Entry
Description
FileType ‘-‘ for file & ‘d’ for directory
Permissions Permissions are in order of Owner, Group & Other
LinkCount Number of links to the file
UID Owner’s User ID
GID Group’s ID
Size Size of the file/directory
Last ModifiedDate & ModifiedTime Last Modified Date & Time of the file/directory
<File/Directory Name> File/Directory name
Example:
# ls -l
total 6
-rw-r–r–   1 root     root        136 May  6  2010 local.cshrc
-rw-r–r–   1 root     root        167 May  6  2010 local.login
-rw-r–r–   1 root     root        184 May  6  2010 local.profile

Understanding permissions:

Following table explains the permission entry:

Entry
Description
No permission/denied
r read permission
w write permission
x execute permission

File Command: It is used to determine the file type. The output of file command can be “text”, “data” or “binary”.
Syntax: file <file name>
Example: 
# file data
data: English text

Changing Directories: ‘cd’ commad is used to change directories.
Syntax: cd <dir name>
If cd command is used without any option it changes the directory from current working directory to user’s home directory.


Example: Let the user be ‘ravi’ and current working directory is /var/adm/messages#pwd
/var/adm/messages
#cd
#pwd
#/export/home/raviThere is also a different way to navigate to the user’s home directory :
#pwd
/var/adm/messages
#cd ~ravi
#pwd
/export/home/ravi
#cd ~raju
#pwd
/export/home/raju
#cd ~ravi/dir1
#pwd
/export/home/ravi/dir1In the above examples, the ‘~’ character is the abbreviation that represents the absolute path of the user’s home directory. However this functionality is not available in all shells.There are few other path name abbreviations which we can use as well. These are listed below :
.  → current working directory
.. → Parent directory or directory above the current working  directory.
So if we want to go to the parent directory of the current working directory following command is used:
#cd ..We can also navigate multiple levels up in directory using cd, .. and /.
Example: If you want to move two levels up the current working directory, we will use the command :
#cd ../..
#pwd
/export/home/ravi
#cd ../..
#pwd
/export
#cd ..
#pwd
/

Viewing the files:

cat command: It displays the entire content of the file without pausing.
Syntax: cat <file name>
Example:
#file data
data: English text
#cat data
This is an example for demonstrating the cat command.
#
Warning: The cat command should not be used to open a binary file as it will freeze the terminal window and it has to be closed. So check the file type using ‘file’ command, if you are not sure about it.more command: It is used to view the content of a long text file in the manner of one screen at a time.
Syntax: more <file name>The few scrolling options used with more command are as follows :

Scrolling Keys
Action
Space Bar Moves forward one screen
Return Scrolls one line at a time
b Moves back one screen
h Displays a help menu of features
/string searches forward for a pattern
n finds the next occurrence of the pattern
q quits and returns to shell prompt



Head and Tail command in UNIX/LINUX/SOLARIS:
head command: It displays the first 10 lines of a file by default. The number of lines to be displayed can be changed using the option -n. The syntax for the head command is as follows:
Syntax: head -n <file name>
This displays the first n lines of the file.

tail command: It displays the last 10 lines of a file by default. The number of lines to be displayed can be changed using the options -n or +n.
Syntax: 
#tail -n <file name>
#tail +n <file name>
The -n option displays the n lines from the end of the file.
The +n option displays the file from line n to the end of the file.


Displaying line, word and character count:
wc command: It is used to display the number of lines, words and characters in a given file.
Syntax: wc -options <file name>

The following option can be used with wc command:

Option
Description
l Counts number of lines
w Counts number of words
m Counts number of characters
c Counts number of bytes
Example: 
#cat data
This is an example for demonstrating the cat command.
#wc -w data
9

Copying Files: 

cp command: It can be used to copy file/files.
Syntax:cp -option(s) surce(s) destination
The options for the cp command are discussed below :
Option
Description
i Prevents the accidental overwriting of existing files or directories
r Includes the contents of a directory, including the contents of all sub-directories, when you copy a directory
Example:
#cp file1 file2 dir1
In the above example file1 and file2 are copies to dir1.

Moving & renaming files and directories: 

mv command: It can be used to

1. Move files and directories within the directory hierarchy :
Example: We want to move file1 and file2 under the directory /export/home/ravi to /var
#pwd
/export/home/ravi

#mv file1 file2 /var

2. Rename existing files and directories.
Example: we want to rename file1 under /export/home/ravi to file2.
#pwd
/export/home/ravi

#mv file1 file2

The mv command does not affect the contents of the files or directories being moved or renamed.

We can use -i option with the mv command to prevent the accidental overwriting of the file.

Creating files and directories :

touch Command : It is used to create an empty file. We can create multiple file using this command.
Syntax: touch <files name>
Example: #touch file1 files2 file3

mkdir command : It is used to create directories.
Syntax: mkdir -option <dir name>

When the <dir name> includes a pah name, option -p is used to create all non-existing parent directory.

Example:
#mkdir -p /export/home/ravi/test/test1

Removing Files and Directories :

rm command: It is used permanently remove files/directories.

 Syntax: rm -option <file name>/<dir name>

The -i option is used to prompt user for confirmation before the deletion of files/directories.

Example: We want to remove file1 and file2 from the home directory of user ravi.
#pwd
/
#cd ~ravi
#pwd
/export/home/ravi
#rm file1 file2
Note: The removal of a directory is slightly different. If the directory is not empty and you are trying to delete it, you will not be able to do so. You need to use -r option to remove the directory with files and sub-directories.
Example: We want to delete a directory test under user ravi home directory and it contains file and sub-directories.
#pwd
/export/home/ravi
#rm test
rm: test is a directory
#rm -r test

#

To remove an empty directory:
Syntax: rmdir <directory name>


Links (Soft Link and Hard Link) : This section has been covered under section :Solaris File System. Please refer to it.

Searching Files, Directories & its contents:

Using the grep command : The grep is very useful and widely used command.
lets take an example where we want to see if the process statd is running of not. Following command is used :
#ps -ef | grep statd

# ps -ef | grep statd
daemon  2557     1   0   Jul 07 ?           0:00 /usr/lib/nfs/statd
root 10649  1795   0 05:29:39 pts/4       0:00 grep statd
#
Syntax: grep options filenames.
The options used are discussed below :

i Searches both uppercase and lowercase characters
l Lists the name of files with matching lines
n Precedes each line with the relative line number in the file
v Inverts the search to display lines that do not match pattern
c Counts the lines that contain pattern
w Searches for the expression as acomplete word, ignoring those matches that are sub strings of larger words

Lets see few examples:
Suppose we want to search for all lines that contain the keyword root in /etc/group file and view their line numbers, we use following option :
# grep -n root /etc/group
1:root::0:
2:other::1:root
3:bin::2:root,daemon
4:sys::3:root,bin,adm
5:adm::4:root,daemon
6:uucp::5:root
7:mail::6:root
8:tty::7:root,adm
9:lp::8:root,adm
10:nuucp::9:root
12:daemon::12:root

To search for all the lines that does not contain the keyword root:
# grep -v root /etc/group
staff::10:
sysadmin::14:
smmsp::25:
gdm::50:
webservd::80:
postgres::90:
unknown::96:
nobody::60001:
noaccess::60002:
nogroup::65534:
cta::101:
rancid::102:
mysql::103:
torrus::104:

To search for the names of the files that contains the keyword root in /etc directory :
# cd /etc
# grep -l root group passwd hosts
group
passwd

To count the number of lines containing the pattern root in the /etc/group file:
# grep -c root group
11

Using regular expression Metacharacters with grep command:

Metachar Purpose Example Result
^ Begining of line Anchor ‘^test’ Matches all lines begining with test
$ End of line anchor ‘test$’ Matches all the lines ending with test
. Matches one char ‘t..t’ Matches all the line starting and ending with t and 2 char between them
* Matches the preceding item 0 or more times ‘[a-s]*’ Matches all lines starting with lowercase a-s
[] Matches one character in the pattern ‘[Tt]est’ Matches lines containing test ot Test
[^] Matches one character not in pattern ‘[^a-s]est’ Matches lines that do not contain “a” though “s” and followed by est
Using egrep command : 

With egrep we can search one or more files for a pattern using extended regular expression metacharacters.

Following table describes the Extended Regular Expression Metacharacters :
Metachar
Purpose
Example
Result
+ Matches one of more preceding chars ‘[a-z]+est’ Matches one or more lowercase letters followed by est(for example chest, pest, best, test, crest etc
x|y Matches either x or y ‘printer|scanner’ Matches for either expression
(|) Groups characters ‘(1|2)+’ or ‘test(s|ing)’ Matches for one or more occurrence.
Syntax: egrep -options pattern filenames
Examples:
#egrep ‘[a-z]+day’ /ravi/testdays
sunday
monday
friday
goodday
badday
In the above example, we searched for the letter ending with day in the file /ravi/testdays#egrep ‘(vacation |sick)’ leave’ /ravi/leavedata
vacation leave on 7th march
sick leave on 8th march
In the above example we are displaying sick leave and vacation leave from file /ravi/leavedataUsing fgrep command :
It searches for all the character regardless of it being metacharacter as we have seen in case of grep and egrep commands.
Syntax: fgrep options string filenames
Example:
#fgrep ‘$?*’ /ravi/test
this is for testing fgrep command $?*
#Using Find command :
This command is used to locate files and directories. You can relate it with windows search in terms of functionality.
Syntax: find pathnames expressions actionsPathname: The absolute or relative path from where the search begins.Expressions: The search criteria is mentioned here. We will discuss search criteria below in details.

Expression
Definition
-name filename Finds the file matching.
-size [+|-]n Finds files that are larger than +n, smaller than -n, or exactly n.
-atime [+|-]n Find files that have been accessed more than +n days, less than -n or exactly n days ago.
-mtime [+|-]n Find files that have been modified more than +n days, less than -n or exactly n days ago.
-user loginID Finds all files that are owned by the loginID name.
-type Finds a file type : f for file, d for directory.
-perm Find files that have certain access permission bits.

Action: Action required after all the files have been found. By default it displays all the matching pathnames

Action
Definition
-exec command {} \; Runs the specified command on each file located.
-ok commadn {} \:
Requires confirmation before the find command applies the command to each file located.
-print Prints the search result
-ls Displays the current pathname and associated stats : inode number, size in kb, protection mode, no. of hard links and the user.
-user loginID Finds all files that are owned by the loginID name.
-type Finds a file type : f for file, d for directory.
-perm Find files that have certain access permission bits.

Examples:
#touch findtest
#cat >> findtest
This is for test.
#find ~ -name findtest -exec cat {} \;
This is for test.
#
The above examples searches for the file : findtest and displays its content. We can also use ‘ok’ option instead of exec. This will prompt for confirmation before displaying the contents of file findtest.

If we want to find files larger than 10 blocks (1 block = 512bytes) starting from /ravi directory, following command is used :
#find /ravi -size +10

If we want to see all files that have not been modified in the last two days in the directory /ravi, we use :
#find /ravi -mtime +2


Printing Files:

lp comand : This command is located in /usr/bin directory. It is used to submit the print request to the printer.
Syntax:
/usr/bin/lp <file name>

/usr/bin/lp -d <printer name > <file name>

The options for the lp command are discussed below :
Option
Description
d It is used to specify the desired printer. It is not required if default printer is used
o It is used to specify that the banner page should not be printed
n Print the number of copies specified
m It send email after the print job is complete
lpstat command : It displays the status of the printer queue.  The Syntax for this command is as follows:
lpstat -option <printer name>
The options for the lpstat command are discussed below :
Option
Description
p Displays the status of all printers
o Displays the status of all output printers
d Displays the default system printer
t Displays the complete status information of all printers
s Display the status summary of all printers
a Displays which printers are accepting request
The output of the lpstat command is in the following format :
<request ID> <user ID> <File Size> <Date & Time> <status>
Cancel command : It is used to cancel the print request.
Syntax:
cancel <request ID>
cancel -u <user name>
Note: We can use lpstat command to get the request ID.
Share

How To Add-Remove Vdisk From Guest LDOMS

September 8th, 2019, posted in Solaris
Share

I’ll share the simple steps needed to add and remove a virtual disk in a running domain without any outage.
This is a system running Oracle VM Server for SPARC 3.1 with a Solaris 11.1 guest domain named ldom0.
I used NFS storage because it is easy to set up and lets me use live migration.

 

Adding a virtual disk to a running domain

The entire sequence of commands in the control domain defines, adds and removes a disk while the guest domain runs:

# mkfile -n 20g  /ldomsnfs/ldom0/disk1.img       # 1. create a disk image file
# ldm add-vdsdev /ldomsnfs/ldom0/disk1.img vol01@primary-vds0 # 2. define vdisk
# ldm add-vdisk vdisk01 vol01@primary-vds0 ldom0 # 3. add disk to the domain
# ldm rm-vdisk vdisk01 ldom0                     # 4. take it away from the domain.
# ldm rm-vdsdev vol01@primary-vds0               # 5. undefine the virtual disk
# rm disk1.img                                   # 6. save a little space.

That’s all there is to it. The new disk is available for the domain’s use after step 3 until I take it away in step 4.

 

Viewing reconfiguration from within the guest

Let’s take a look from the guest domain’s perspective.
In the guest, you can see one disk before adding more (before command 3, above) via the formatcommand:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c3d1 
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): ^C

There’s one disk until ldm add-vdisk is issued in the control domain.
That results in a dynamic reconfiguration event that can be seen, if you are curious, by entering dmesg within the guest:

# dmesg|tail
...snip...
Nov 20 12:03:23 ldom0 vdc: [ID 625787 kern.info] vdisk@0 is online using ldc@16,0
Nov 20 12:03:23 ldom0 cnex: [ID 799930 kern.info] channel-device: vdc0
Nov 20 12:03:23 ldom0 genunix: [ID 936769 kern.info] vdc0 is /virtual-devices@100/channel-devices@200/disk@0
Nov 20 12:03:23 ldom0 genunix: [ID 408114 kern.info] /virtual-devices@100/channel-devices@200/disk@0 (vdc0) online

You can see the added disk using format and then use it. In this case I created a temporary ZFS pool.

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c3d0 
          /virtual-devices@100/channel-devices@200/disk@0
       1. c3d1 
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): ^C
# zpool create temp c3d0
# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  19.9G  5.27G  14.6G  26%  1.00x  ONLINE  -
temp   19.9G   112K  19.9G   0%  1.00x  ONLINE  -

At this point I can just go ahead and use the added disk space. I could have done other things like add it to the existing ZFS pool
to make it a mirror, but this illustrates the point.

 

What happens if I try to remove an in-use disk

It could be very damaging to remove a virtual device while it is in use, so the default behavior
is that Solaris tells logical domains manager that the device is in use and cannot be removed.
That’s a very important advantage of Oracle VM Server for SPARC: the logical domains framework and Solaris work cooperatively,
in this and many other aspects.

In this case, we’re prevented from yanking a disk while it is in use.
If I try to remove the disk while it’s in use, I get an error message – exactly what you want:

# ldm rm-vdisk vdisk01 ldom0
Dynamic reconfiguration of the virtual device on domain ldom0
failed with error code (-122).
The OS on domain ldom0 did not report a reason for the failure.
Check the logs on that OS instance for any further information.
Failed to remove vdisk instance

The reason is “because it’s in use!” 🙂 An administrator would log into the guest to see what file systems are mounted.
This behavior can be overridden using the “-f” option if you are certain
you know what you’re doing.

Removing the disk

I issued zpool destroy temp in the guest and repeated the ldm rm-vdsdev and it worked.
Using zpool export temp would work just as well, and if I choose I can add that virtual disk to a different
domain and it could use zpool import temp to access data created by ldom0.
With other file systems, a regular umount would have the same effect, making it possible to remove the disk without -f.

The format command now shows only one disk again, and dmesg shows kernel messages when disk went offline:

Nov 20 12:42:10 ldom0 vdc: [ID 990228 kern.info] vdisk@0 is offline
Nov 20 12:42:10 ldom0 genunix: [ID 408114 kern.info] /virtual-devices@100/channel-devices@200/disk@0 (vdc0) offline

 

Summary

Solaris and the logical domain manager are engineered to work together in a coordinated fashion
to provide operational flexibility.
One of the values this provides is that
administrators can safely add and remove virtual devices while domains run.
This can be used for operational tasks like adding or removing disk capacity or IOPS as needed.
The same capabilities are also available for virtual network devices.

Share

Show Faulted Hardware in ILOM

August 5th, 2019, posted in Solaris
Share

in an ILOM (Integrated Lights Out Manager). On this page I will use the example of a chassis fan module error. If you follow my notes and the error clears Then you didn’t have a real issue. On the other hand, If after following my notes you can’t clear the error. Then you have a real hardware issue. You can’t clear errors if the error is still an issue.

This is how you login to the command line interface for the ILOM.

 

man@earth> ssh root@ilom


The command below is one way to show system faults. The only target you should see is shell. If you see anything other then shell it is a fault. In the example below, the ILOM shows a bad system fan. Shown as 0 (/SYS/FMO).

 

–> show /SP/faultmgmt

/SP/faultmgmt
Targets:
shell
0 (/SYS/FM0)

Properties:

Commands:
cd
show


Using the show faulty command is anther way to see the system faults. This command shows a lot more detail. If you have a support contract with Oracle, you will want to paste the output of this command into the ticket, you submit to MOS. The show faulty command can be used without any paths, which will be extra useful if are coming in from a chassis ILOM.

 

–> show faulty
Target                    | Property                   | Value
———————–+————————–+———————————
/SP/faultmgmt/0    | fru                            | /SYS/FM0
/SP/faultmgmt/0/   | class                         | fault.chassis.device.fan.fail
faults/0                  |                                  |
/SP/faultmgmt/0/   | sunw-msg-id            | SPX86-8X00-33
faults/0                  |                                  |
/SP/faultmgmt/0/   | component               | /SYS/FM0
faults/0                   |                                 |
/SP/faultmgmt/0/   | uuid                          | 8692c3e4-G481-635e-f8e2-f3f215d1
faults/0                   |                                 | 13f0
/SP/faultmgmt/0/   | timestamp                | 2013-10-02/12:10:43
faults/0                   |                                 |
/SP/faultmgmt/0/   | detector                   | /SYS/FM0/ERR
faults/0                   |                                  |
/SP/faultmgmt/0/   | product_serial_number | 1203FMM107
faults/0                   |                                  |

The command below shows the event log, which will also contain the system hardware errors.

 

–> show /SP/logs/event/list


To clear the hardware fault from the logs run the command below.

 

–> show /SP/logs/event/ clear=true


Run this command to clear the fan error.

 

–> set /SYS/FM0 clear_fault_action=true

Try to clear the hardware fault. If the hardware is really having an issue, the hardware fault will come back. In about a minute or less. If you can’t clear the error and you have a support contract then this is when you summit your ticket.

If you have any questions or I missed something let me know.

Share

Segmentation Fault (core dumped)

September 4th, 2018, posted in Solaris
Share

Segmentation Fault or Segmentation Fault (core dumped)

Cause

Segmentation faults usually come from a programming error. This message is usually accompanied by a core dump, except on read-only file systems.

Action

To see which program produced a core(4) file, run either the file(1) command or the adb(1) command. The following examples show the output of the file(1) and adb(1) commands on a core file from the dtmail program.

$ file core
core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail'
$ adb core
core file = core -- program `dtmail'
SIGSEGV  11: segmentation violation
^D      (use Control-d to quit the adb rogram)

 

Segmentation Fault (core dumped) or Segmentation Fault,Segmentation Fault (core dumped), Segmentation Fault,core dumped,solaris,solaris 10,Solaris Common Messages and Troubleshooting Guide,Solaris Common Messages,Troubleshooting Guide,Solaris Troubleshooting,

Segmentation Fault (core dumped) or Segmentation Fault,Segmentation Fault (core dumped), Segmentation Fault,core dumped,solaris,solaris 10,Solaris Common Messages and Troubleshooting Guide,Solaris Common Messages,Troubleshooting Guide,Solaris Troubleshooting ,

Share