Operating System - HP-UX
1834252 Members
1796 Online
110066 Solutions
New Discussion

Re: Create NIC port utilization report

 
SOLVED
Go to solution
Jojo Castro
Regular Advisor

Create NIC port utilization report

Hi all.

I am planning to create NIC port utilization report on HP-UX 11.23 box.
Using mwa and extract command, what will I have to add in the parameter global (see attached) in order to have the port utilization per NIC or lan. Currently I am using the attached file to extract CPU, MEMORY and SWAP only using the following command.

/opt/perf/bin/extract -xp D-1 -f "filename" -r global -G

My 2nd option is using netstat -i. Can anyone tell me what does the value below means?

# netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3 1500 10.121.0.0 AURA01_1 216717462 0 114465300 0 0
lan1 1500 10.121.0.0 AURA01 1685966983 0 741131496 0 0
lo0 4136 loopback localhost 195011599 0 195011624 0 0
lan6 1500 10.121.0.0 AURA01_2 4218006025 0 3694414845 0 0


thanks!
14 REPLIES 14
Yogeeraj_1
Honored Contributor

Re: Create NIC port utilization report

hi,

option 3 would be using glance -l

e.g.
Interval: 5 NETWORK BY INTERFACE Users= 3
Network Packet Packet K-Byte K-Byte
Idx Interface Type Rate In Rate Out Rate In Rate Out
--------------------------------------------------------------------------------
1 lan0 Lan 7.1 8.0 10.0 0.0/ 0.0 0.5/ 0.7 0.0/ 0.0
2 lan1 Lan 7.1 8.0 10.0 0.0/ 0.0 0.5/ 0.7 0.0/ 0.0
3 lan2 Lan 25.715.1 17.6 8.0/ 17.4 0.9/ 1.1 0.3/ 1.0
4 lo0 Loop na/ na na/ na na/ na na/ na




> Can anyone tell me what does the value below means?

Name : name of the interface
Mtu : Message transfer unit
Network Address: Name or IP Address of network interface (can be both primary and logical interfaces)

Ipkts : Input packets
Ierrs : Input errors
Opkts : Output packets
Oerrs : Output errors



hope this helps!

kind regards
yogeeraj
Coll :
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

glance -l is interactive and current. I need to a way to extract previous stats.

Thanks!
whiteknight
Honored Contributor

Re: Create NIC port utilization report

Hi

use -N and -n option

man extract


Selects types of data to extract/export
g = global detail
a = application detail
p = process detail
k = process (killed records only)
d = disk device detail
z = logical volume detail
c = configuration detail
n = netif detail
t = transaction detail (Not in Tru64 UNIX)
u = CPU detail
y = filesystem detail
G = global summary (Export only)
A = application summary (Export only)
D = disk device summary (Export only)
Z = logical volume summary (Export only)
N = netif summary (Export only)
T = transaction summary (Export only)
(Not in Tru64 UNIX)
U = CPU summary (Export only)


let me out the outcome

WL
Problem never ends, you must know how to fix it
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

Hi WL,

I think I will just use the -N option for the summary (hourly). But I am planning to put this is cron to be run end of day. When I use the command extract -N -b 05/05/2008 -e 05/05/2008 -f /home/jojo/`hostname`_net.txt , it's interactive. how can I use extract without going to MENU anymore just to type "export?".

Thanks!
Jeeshan
Honored Contributor

Re: Create NIC port utilization report

Hi Castro

You can configure mrtg for NIC utilization report with rrdtools. Its a grafical and great tools for monitoring.
a warrior never quits
Yogeeraj_1
Honored Contributor
Solution

Re: Create NIC port utilization report

hi,

You will need to create a template file so that you can schedule it using cron.

e.g.
59 23 * * * /opt/perf/bin/extract -xp -r /home/yogi/zgbltemplate -g -b today 00:00 -e today 23:59 -f stdout | /bin/mailx -s "SLX2: Measureware Performance figures - FULL DAY " abc01@mydom.mu >/dev/null 2>&1


The zgbltemplate file will contain all the parameters.
e.g.
SRV2:>cat /home/yogi/zgbltemplate
REPORT "MWA Export on !SYSTEM_ID"
FORMAT ASCII
HEADINGS ON
SEPARATOR="|"
SUMMARY=60
MISSING=0
DATA TYPE GLOBAL
YEAR
DATE
TIME
GBL_NET_PACKET_RATE
GBL_NET_OUTQUEUE
GBL_NETWORK_SUBSYSTEM_QUEUE

SRV2:>

NB. You will need to adjust for your environment.

hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

Thanks ahsan.

But I guess I will just use extract -N.
Last thing is, can anyone interpret what does the header on each column means? how can we say its still good or there's something wrong with the NIC.

In
KB Rate

Out
KB Rate

In Pkt
Rate

Out Pkt
Rate

Error
Rate

Coll
Rate

Outbnd
Queue
Yogeeraj_1
Honored Contributor

Re: Create NIC port utilization report

>how can we say its still good or there's something wrong with the NIC.

You can use nettl to capture and analyze the log for all network activities.

see 'man netttl' for the levels of logging.

Hardware failure will usually, appear in the syslog.log. Any other errors should be found by using the netttl command.

hope this helps!

Kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

Thanks yogeeraj.

On the template you have sent, is it possible that we include the "per NIC or LAN" status?

Can you provide all the possible parameters I can add on the template in relation with network status?

Thanks!
Yogeeraj_1
Honored Contributor

Re: Create NIC port utilization report

hi again,

To analyse the nettl* log files, you will need to run the netfmt command.

e.g.
netfmt -F /var/adm/nettl001.log

or

netfmt -F /var/adm/nettl001.log -t 5 ( for last 5 records )


Note also that Bill Hassel also mentioned that:
"The nettl format tool is OK but exceedingly difficult to decipher. A better choice is to use Wireshark (formerly Ethereal) which reads several hundred different log file formats including nettl. You can download it from http://www.wireshark.org/ for your PC or get an Xwindow version from http://hpux.connect.org.uk/"

see: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1175061


kind regards,
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Create NIC port utilization report

>On the template you have sent, is it possible that we include the "per NIC or LAN" status?

>Can you provide all the possible parameters I can add on the template in relation with network status?


There are also the following parameters:
GBL_NETWORK_SUBSYSTEM_QUEUE
GBL_NET_COLLISION_1_MIN_RATE
GBL_NET_COLLISION_PCT
GBL_NET_ERROR_1_MIN_RATE
GBL_NET_IN_ERROR_PCT
GBL_NET_IN_PACKET
GBL_NET_IN_PACKET_RATE
GBL_NET_OUTQUEUE
GBL_NET_OUT_ERROR_PCT
GBL_NET_OUT_PACKET
GBL_NET_OUT_PACKET_RATE
GBL_NET_PACKET_RATE
GBL_NFS_CALL
GBL_NFS_CALL_RATE
GBL_NUM_DISK
GBL_NUM_NETWORK

Please have a look at the following path for more information on the metrics which is found in different documents:
/opt/perf/paperdocs/mwa/C/


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

Thanks Very Much to all! Really appreciate the help.
Yogeeraj_1
Honored Contributor

Re: Create NIC port utilization report

hi,

See also file:
/opt/perf/paperdocs/mwa/C/methp.txt

The metrics are classified by Data Class with also a detailed description of each of the metrics.

Extract below:

...
HP-UX NETWORK INTERFACE METRICS
-------------------------------
BLANK
DATE
DATE_SECONDS
DAY
INTERVAL
RECORD_TYPE
TIME
YEAR
BYNETIF_COLLISION
BYNETIF_COLLISION_RATE
BYNETIF_ERROR
BYNETIF_ERROR_RATE
BYNETIF_IN_BYTE_RATE
BYNETIF_IN_BYTE_RATE_CUM
BYNETIF_IN_PACKET
BYNETIF_IN_PACKET_RATE
BYNETIF_NAME
BYNETIF_NET_MTU
BYNETIF_NET_SPEED
BYNETIF_OUT_BYTE_RATE
BYNETIF_OUT_BYTE_RATE_CUM
BYNETIF_OUT_PACKET
BYNETIF_OUT_PACKET_RATE


kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jojo Castro
Regular Advisor

Re: Create NIC port utilization report

Good Job for those who help.