Go to main content

Managing System Information, Processes, and Performance in Oracle® Solaris 11.4

Exit Print View

Updated: August 2019
 
 

How to List Processes

  • Use the ps command to list all the processes on a system.
    $ ps [-efc]
    ps

    Displays only the processes that are associated with your login session.

    –ef

    Displays full information about all the processes that are being executed on the system.

    –c

    Displays process scheduler information.

Example 7  Listing Processes

The following example shows output from the ps command when no options are used.

$ ps
   PID TTY      TIME COMD
  1664 pts/4    0:06 csh
  2081 pts/4    0:00 ps

The following example shows output from the ps –ef command. This output shows that the first process that is executed when the system boots is sched (the swapper) followed by the init process, pageout, and so on.

$ ps -ef
 UID   PID  PPID   C    STIME TTY         TIME CMD
    root     0     0   0 18:04:04 ?           0:15 sched
    root     5     0   0 18:04:03 ?           0:05 zpool-rpool
    root     1     0   0 18:04:05 ?           0:00 /sbin/init
    root     2     0   0 18:04:05 ?           0:00 pageout
    root     3     0   0 18:04:05 ?           2:52 fsflush
    root     6     0   0 18:04:05 ?           0:02 vmtasks
  daemon   739     1   0 19:03:58 ?           0:00 /usr/lib/nfs/nfs4cbd
    root     9     1   0 18:04:06 ?           0:14 /lib/svc/bin/svc.startd
    root    11     1   0 18:04:06 ?           0:45 /lib/svc/bin/svc.configd
  daemon   559     1   0 18:04:49 ?           0:00 /usr/sbin/rpcbind
  netcfg    47     1   0 18:04:19 ?           0:01 /lib/inet/netcfgd
   dladm    44     1   0 18:04:17 ?           0:00 /sbin/dlmgmtd
  netadm    51     1   0 18:04:22 ?           0:01 /lib/inet/ipmgmtd
    root   372   338   0 18:04:43 ?           0:00 /usr/lib/hal/hald-addon-cpufreq
    root    67     1   0 18:04:30 ?           0:02 /lib/inet/in.mpathd
    root   141     1   0 18:04:38 ?           0:00 /usr/lib/pfexecd
  netadm    89     1   0 18:04:31 ?           0:03 /lib/inet/nwamd
    root   602     1   0 18:04:50 ?           0:02 /usr/lib/inet/inetd start
    root   131     1   0 18:04:35 ?           0:01 /sbin/dhcpagent
  daemon   119     1   0 18:04:33 ?           0:00 /lib/crypto/kcfd
    root   333     1   0 18:04:41 ?           0:07 /usr/lib/hal/hald --daemon=yes
    root   370   338   0 18:04:43 ?           0:00 /usr/lib/hal/hald-addon-network-discovery
    root   159     1   0 18:04:39 ?           0:00 /usr/lib/sysevent/syseventd
    root   236     1   0 18:04:40 ?           0:00 /usr/lib/ldoms/drd
    root   535     1   0 18:04:46 ?           0:09 /usr/sbin/nscd
    root   305     1   0 18:04:40 ?           0:00 /usr/lib/zones/zonestatd
    root   326     1   0 18:04:41 ?           0:03 /usr/lib/devfsadm/devfsadmd
    root   314     1   0 18:04:40 ?           0:00 /usr/lib/dbus-daemon --system
    ...