Linux - HP UX Command options

Just I gone with the script, I found some command's options which are not compatible with " HP-UX ".

If I found any alternate commands to the following, most probably I will solve the issue here.

  1. " iostat -x " --> this command's option( x ) is not available in HP-UX flavor, but command is there

  2. " netstat -i " --> this command's option( i ) is not available in HP-UX flavor, but command is there

Please help me

man iostat

man netstat

barring that, you could get the source and compile them for HPUX with limited success. Then you could have them in a local resource.

Unfortunately, the HP-UX iostat only gives KB/s transferred, Seeks/s and ms/seek per disk device
and not the detail the Linux implementation does.
If that doesn't suffice you would need Glance (which requires an extra license).
With Glance installed you can get virtually any system metric,
and you could write a so called Adviser script (shell like syntax) which you can run from a shell script on glance in adviser-only mode (i.e. not the usual interactive mode of glance).

However, with the network stats per NIC we have more luck.
On HP-UX you only use a different interface, viz. the lanadmin command.
So for instance to get the MIB counters of lan0 on this HP box I could issue

$ /usr/sbin/lanadmin -g mibstats 0

This produces lots of counters which I omitted here for brevity,
and which you will have to parse for interesting data.
Important is the final arg which is the so called PPA (physical point of attachment, HP's way of enumerating NICs so to speak)
To get an overview of which NICs are built into the box and supported by the kernel you can run

$ /usr/sbin/lanscan

or more tersely to take only active NICs into account

$ netstat -in