solaris系統用ps命令查看進程佔用的CPU、記憶體等情況

來源:互聯網
上載者:User

solaris系統用ps命令查看進程佔用的CPU、記憶體等情況 用PS命令的-o選項來實現,這些選項有:user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid        pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid        f s c lwp nlwp psr tty addr wchan fname comm args projid project pset 例: ps -efo user,pid,ppid,pcpu,pmem,comm  例:# ps -efo uid,pid,ppid,pcpu,pmem,vsz,rss,osz,etime,stime,comm | grep php   48   939   938  0.1  0.2 22696 11304 2837       04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi   48   952   938  2.0  0.2 22712 11336 2839       04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi   48   945   938  2.9  0.2 22720 11808 2840       04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi   48   938     1  0.0  0.1 18368 7840 2296       04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi 各選項的含義: he following names are recognized in the POSIX locale:       user            The effective user ID of the  process.  This  will  be  the  textual user ID, if it can be                     obtained and the field width permits,  or  a  decimal representation otherwise.       ruser           The real user ID of the process.  This  will be  the  textual  user  ID,  if  it  can  be                     obtained and the field width permits,  or  a decimal representation otherwise.       group           The effective group ID of the process.  This  will  be  the textual group ID, if it can be                     obtained and the field width permits,  or  a  decimal representation otherwise.       rgroup          The real group ID of the process. This  will  be  the  textual  group  ID,  if  it  can be                     obtained and the field width permits,  or  a decimal representation otherwise.       pid             The decimal value of the process ID.       ppid            The decimal value of the parent process ID.       pgid            The decimal value of the process group ID.       pcpu            The ratio of CPU time used recently  to  CPU   time available in the same period, expressed                     as a percentage. The meaning of ``recently''  in this context is unspecified. The CPU time                     available is determined  in  an  unspecified manner.       vsz             The total size of  the  process  in  virtual  memory, in kilobytes.       nice            The decimal value of the  system  scheduling  priority of the process. See nice(1).       etime           In the POSIX locale, the elapsed time  since                     the process was started, in the form:                       [[dd-]hh:]mm:ss                       where                       dd       is the number of days                       hh       is the number of hours                       mm        is the number of minutes                       ss       is the number of seconds                       The dd field will be a decimal integer.  The  hh,  mm  and  ss  fields  will  be two-digit                     decimal integers padded  on  the  left  with zeros.       time            In the POSIX locale, the cumulative CPU time  of the process in the form:                       [dd-]hh:mm:ss                       The dd, hh, mm, and  ss fields  will  be  as  described in the etime specifier.       tty             The name of the controlling terminal of  the  process  (if any) in the same format used by                     the who(1) command.       comm            The  name  of  the  command  being  executed  (argv[0] value) as a string.       args            The command with  all  its  arguments  as  a  string. The implementation may truncate this                     value   to   the   field   width;   it    is  implementation-dependent whether any further                     truncation occurs. It is unspecified whether  the  string  represented is a version of the                     argument list as it was passed to  the  command when it started, or is a version of the                     arguments as they may have been modified  by  the  application. Applications cannot depend                     on being able to modify their argument  list  and having that modification be reflected in                     the output of ps.  The  Solaris  implementation  limits  the  string  to  80 bytes; the    string is the version of the  argument  list  as  it  was  passed  to  the command when it  started.       The following names are recognized in the Solaris  implemen-     tation:       f               Flags (hexadecimal and additive)  associated with the process.       s               The state of the process.       c               Processor   utilization    for    scheduling  (obsolete).       uid             The effective user ID number of the  process  as a decimal integer.       ruid            The real user ID number of the process as  a decimal integer.       gid             The effective group ID number of the process   as a decimal integer.  SunOS 5.10           Last change: 5 Jun 2006                   10  User Commands                                               ps(1)       rgid            The real group ID number of the process as a decimal integer.       projid          The project ID number of the  process  as  a decimal integer.       project         The project ID of the process as  a  textual value  if that value can be obtained; other-                     wise, as a decimal integer.       zoneid          The zone ID  number  of  the  process  as  a decimal integer.       zone            The zone ID of  the  process  as  a  textual value  if that value can be obtained; other-                     wise, as a decimal integer.       sid             The process ID of the session leader.       taskid          The task ID of the process.       class           The scheduling class of the process.       pri             The priority of the process. Higher  numbers mean higher priority.       opri            The obsolete priority of the process.  Lower numbers mean higher priority.       lwp             The decimal value of the lwp ID.  Requesting this formatting option causes one line to be                     printed for each lwp in the process.       nlwp            The number of lwps in the process.       psr             The number of the  processor  to  which  the                     process or lwp is bound.       pset            The ID of the processor set  to  which   the                     process  or lwp is bound.       addr            The memory address of the process.       osz             The total size of  the  process  in  virtual memory, in pages.       wchan           The address of an event for which  the  process  is sleeping (if -, the process is run-                     ning).       stime           The starting time or date  of  the  process, printed with no blanks.       rss             The resident set size  of  the  process,  in kilobytes.  The  rss value reported by ps is                     an estimate provided  by  proc(4)  that  may  underestimate  the actual resident set size.                     Users who wish to get  more  accurate  usage  information for capacity planning should use                     pmap(1) -x instead.       pmem            The ratio of the process's resident set size to  the  physical  memory  on  the  machine,                     expressed as a percentage.       fname           The first 8 bytes of the base  name  of  the process's executable file.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.