Operating System - HP-UX
1850095 Members
2655 Online
104050 Solutions
New Discussion

Re: Problems porting scripts from Linux to HP-UX 11.11

 
Maicon Stihler
Advisor

Problems porting scripts from Linux to HP-UX 11.11

Hello,

I'm newbie on HP-UX and I have to port several scripts that relies heavily on Linux's /proc . I need to know if there are equivalent tools on HP-UX to obtain data like network traffic statistics, disk i/o, process, and so on.

I know that there are some workarounds made in perl (Process::Table ?), but its required that all the work is made in pure sh or ksh, and utilities that are standard on HP-UX.

Im having a hard time porting theses scripts because the people who wrote it used lots os Linux/GNU extensions (like find's "-mmin" option, tac, and all that stuff).

Is there a way to made all these things in HP-UX without resorting to software that doesnt belong to the system base?

Thank you all
3 REPLIES 3
Steve Steel
Honored Contributor

Re: Problems porting scripts from Linux to HP-UX 11.11

Hi


Look at

www.shelldorado.com for scripting aid


Look at man catman on hp-ux with the

-w Causes only the /usr/share/lib/whatis database to
be created. No manual reformatting is done.


You can then use man -k searchword to find
all usefull commands like
man -k virtual
xmbind (1X) - Configures virtual key bindings
clrsvc(1M) - clear x25 switched virtual circuit
mlock()(2) - lock a segment of the process virtual address space in
memory
mlockall()(2) - lock a process virtual address space in memory m19772/mapread.cfg
munlock()(2) - unlock a segment of the process virtual address space tor/dm_FCMS_adapter

munlockall()(2) - unlock the entire virtual address space of a process tor/dm_core_hw
omnicreatedl(1m) - creates a filesystem backup specification file (datalitor/disk_em
st); or a HP StorageWorks Disk Array XP, HP StorageWorks Virtual Array, HP Storator/dm_TL_adapter
geWorks Enterprise Virtual Array or HP StorageWorks Modular SAN Array 1000 Exchator/dm_stape
nge 2000 ZDB backup specification file (datalist). tor/scsi123_em
omnidbeva(1m) - sets, updates, deletes and lists the login information
for HP StorageWorks Enterprise Virtual Array HSV Element Managers tor/sysstat_em
omnidbva(1m) - The command is used to query the HP StorageWorks Virtu
al Array part of the IDB (VADB) and to administer the LUN security, instant recotor/ha_disk_array
very and password information tor/dm_memory
omnirsh(1m) - returns the hostnames of the physical and virtual node
s for the specified cluster hostname, or returns the cell information, stored in
the cell_info file on the specified cluster m19772/mapread.cfg
vfork(2) - spawn new process; share virtual memory tor/dm_FCMS_adapter
vhe_altlog(1M) - login when Virtual Home Environment (VHE) home machinetor/dm_core_hw
is not available tor/disk_em
vhe_list(4) - information file for the Virtual Home Environment tor/dm_TL_adapter
vhe_mounter(1M) - start the Virtual Home Environment (VHE) tor/dm_stape
vmstat(1) - report virtual memory statistics


Steve Steel


If you want truly to understand something, try to change it. (Kurt Lewin)
RAC_1
Honored Contributor

Re: Problems porting scripts from Linux to HP-UX 11.11

Perl Process::Table shout help you to certain extent. you can also instll GNU find for your scripts.

Other things such as network, iostat, processes shoud not be a problem.
Commands that may help you.

lanadmin
iostat
vmstat
sar
glance (User of metrics would be very helpful)

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: Problems porting scripts from Linux to HP-UX 11.11

Most of the Linux specific stuff you mentioned will not work on HP-UX.

I am attaching an hp-ux sar script set that provides some of what you desire. Feel feel to add to it and post back.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com