General
cancel
Showing results for 
Search instead for 
Did you mean: 

TOP Command , Batch and Threads modes

cfantonio
Occasional Contributor

TOP Command , Batch and Threads modes

I'm looking the way to collect some information using a script where have the command top with multiples options but some of those options are no available in HP-UX, What can I do to make a workaround?.

The top command in the script.

top -b -n 1 -H -p $1

 

which displays

-b = Batch-mode operation: Starts top in Batch mode, which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the `-n' command-line option or until killed.

-n = Number-of-iterations: limit as -n number Specifies the maximum number of iterations or frames, the top should produce before ending.

-H = Threads-mode operation: Instructs top to display individual threads. Without this command-line option, a summation of all threads in each process is shown. Later this can be changed with the `H' interactive command. This is important as it shows individual thread CPU utilization for the input, which I can't find in the link you shared.

I only find -n and -p are existing for hp-ux.

3 REPLIES
Steven Schweda
Honored Contributor

Re: TOP Command , Batch and Threads modes

> I only find -n and -p are existing for hp-ux.

   Which versions of "top" are you looking at on which systems?

cfantonio
Occasional Contributor

Re: TOP Command , Batch and Threads modes

Hi,

OS HP-UX B.11.31

pooderbill
Valued Contributor

Re: TOP Command , Batch and Threads modes

The latest patch/revision for top is PHCO_42966 which has a 2012 date. There have apparently been no changes since then. The top program doesn't have any industry standard for implementation so referencing a Linux or Solaris or AIX man page for options isn't useful for HP-UX. 

The tool you need in order to monitor threads in HP-UX is Glance which is a priced product for the fundamental operating environment (FOE). It is currently included in the larger environments such as MCOE, VSOE and DCOE.