home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / aix / 13785 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.8 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!csus.edu!netcom.com!netcomsv!mbeckman!mbeckman
  2. From: mbeckman@mbeckman.mbeckman.com (Mel Beckman)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: top command on aix?
  5. Date: Tue, 26 Jan 93 16:35:19 PST
  6. Organization: Beckman Software Engineering
  7. Message-ID: <01050810.om6677@mbeckman.mbeckman.com>
  8. Reply-To: mbeckman@mbeckman.com
  9. Distribution: world
  10. X-Mailer: uAccess LITE - Macintosh Release: 1.5v5
  11. Lines: 30
  12.  
  13.  
  14. In article <1993Jan26.141611.19688@jarvis.csri.toronto.edu> (comp.unix.aix), jwang@sys.toronto.edu (Jingwen Wang) writes:
  15. >    Is there a command similar to "top" on aix?  This command is useful to
  16. > find out which processes are consuming most of the cpu time.
  17.  
  18.  
  19. You can make an alias for the Korn shell to do this:
  20.  
  21.  alias top = '(ps u | head -1; ps aux | grep -v PID | sort +2r)'
  22.  
  23. Put this statement in your .profile (I think it will work there) or put
  24. it in a file and run it using the dot-space operation:
  25.  
  26.     . topalias  (where topalias is the file containing the above alias stmt)
  27.  
  28. (Note the space after the dot! This is telling the shell to run the command
  29. in the current environment instead of creating a subshell, in which case
  30. you'd lose the alias upon return).
  31.  
  32.   -mel
  33.  
  34. _____________________________________________________________________
  35. | Mel beckman                  |    Internet: mbeckman@mbeckman.com |
  36. | Beckman Software Engineering |  Compuserve: 75226,2257            |
  37. | 1201 Nilgai Place            |       Voice: 805/647-1641          |
  38. | Ventura, CA 93003            |         Fax: 805/647-3125          |
  39. |______________________________|____________________________________|
  40.  "Internet is big.  Really Big.  It gives the idea of
  41.   infinity much better than infinity itself." 
  42.    (with apologies to Douglas Adams)
  43.