Wednesday, April 29, 2009

Solaris commands for system information

Posted on 3:44 PM by Kalum Umesh

# showrev

This command show machine, software revision, and patch revision information. Hostname can be also printed by hostname command, hostid by hostid command

# uname

The uname utility prints information about the current system on the standard output. When options are specified, symbols representing one or more system characteristics will be written to the standard output. If no options are specified, uname prints the current operating system's name.

-bash-3.00$ uname -a
SunOS solaris 5.10 Generic_118844-26 i86pc i386 i86pc
-bash-3.00$

# prtconf

The prtconf command prints the system configuration information. The output includes the total amount of memory, and the configuration of system peripherals formatted as a device tree.


bash-3.00# prtconf | grep -i memory
Memory size: 511 Megabytes
bash-3.00#

# prsinfo

psrinfo displays information about processors. Each physical processor may support multiple virtual processors. Each virtual processor is an entity with its own interrupt ID, capable of executing independent threads.

bash-3.00# psrinfo
0 on-line since 02/21/2007 12:23:20


The -vp option with psrinfo returns both information on physical and virutal processors

bash-3.00# psrinfo -vp
The physical processor has 1 virtual processor (0)
x86 (GenuineIntel family 6 model 8 step 10 clock 1000 MHz)
Intel(r) Pentium(r) III
bash-3.00#



# isainfo

The isainfo utility is used to identify various attributes of the instruction set architectures supported on the currently running system. Among the questions it can answer are whether 64-bit applications are supported, or whether the running kernel uses 32-bit or 64-bit device drivers.

bash-3.00# isainfo -bv
32-bit i386 applications
sse fxsr mmx cmov sep cx8 tsc fpu
bash-3.00#

bash-3.00# isalist
pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
bash-3.00#

# w

The w command displays a summary of the current activity on the system, including what each user is doing. The heading line shows the current time, the length of time the system has been up, the number of users logged into the system, and the average number of jobs in the run queue over the last 1, 5 and 15 minutes.

# tty

The tty utility writes to the standard output the name of the terminal that is open as standard input. The name that is used is equivalent to the string that would be returned by the ttyname(3C) function.

bash-3.00# tty
/dev/pts/6
bash-3.00#

# ps

The ps command prints information about active processes. Without options, ps prints information about processes that have the same effective user ID and the same controlling terminal as the invoker. The output contains only the process ID, terminal identifier, cumulative execution time, and the command name. Otherwise, the information that is displayed is controlled by the options.


bash-3.00# ps -ef (includes all processes with users, time,PID,PPID,etc.)
bash-3.00# ps -ef | grep john
bash-3.00# ps -U john

# pgrep

The pgrep utility examines the active processes on the system and reports the process IDs of the processes whose attributes match the criteria specified on the command line. Each process ID is printed as a decimal value and is separated from the next ID by a delimiter string, which defaults to a newline. For each attribute option, the user can specify a set of possible values separated by commas on the command line.

bash-3.00# pgrep sshd
368
23389
23386
bash-3.00# ps -ef | grep sshd
root 368 1 0 Feb 21 ? 0:00 /usr/lib/ssh/sshd
john 23389 23386 0 07:54:42 ? 0:01 /usr/lib/ssh/sshd
root 23386 368 0 07:54:41 ? 0:00 /usr/lib/ssh/sshd

# pkill

pkill functions identically to pgrep, except that each matching process is signaled as if by kill instead of having its process ID printed. A signal name or number may be specified as the first command line option to pkill.

bash-3.00# ps -U john
PID TTY TIME CMD
23389 ? 0:01 sshd
23391 pts/6 0:00 bash
bash-3.00# pkill sshd

# pwdx

List the working directories of specified process.

bash-3.00# pwdx 26510
26510: /
bash-3.00#

# prstat (same as top in linux)

The prstat utility iteratively examines all active processes on the system and reports statistics based on the selected output mode and sort order. prstat provides options to examine only processes matching specified PIDs, UIDs, zone IDs, CPU IDs, and processor set IDs.

PID Process ID
USERNAME Username
SIZE Memory size in use
RSS Runstate
STATE Current state
PRI priority
NICE Nice level
TIME CPU time user
CPU CPU use
PROCESS/NLWP Process name

No Response to "Solaris commands for system information"

Leave A Reply

 
Free Website Hosting