Network usage


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Network usage
# 1  
Old 09-18-2015
Network usage

Hello,

I need to collect the network usage in linux 6.5 version ,report like max/min/average speed ,I know some of the command like netstats -s /ifconfig but I am not sure which part of the output will be used to extract this info.I can't install any new tool like nload,iftop,vnstat.
# 2  
Old 09-18-2015
Start with the array of /proc/net entries.

"speed" is how you choose to measure it. Unless you monitor constantly you cannot get anything meaningful for:max,min, or average. Unless one of your /proc/net entries has something useful. I do not know what 6.5 has offhand.
# 3  
Old 09-18-2015
/proc/net has all other files which mainly has zero size files.I am not sure what do you mean by monitoring constantly, if i can put some script that collect the stats constantly say for every 5 minutes or so but i need the command specifically used to collect the stats of the network so that i can calculate the speed.And I don't have option to install anything new tools on the server as I am not the root user.
# 4  
Old 09-18-2015
Quote:
Originally Posted by netdbaind
/proc/net has all other files which mainly has zero size files.
They are not real files. Everything in /proc is an interface to the kernel itself.

Code:
$ ls -l /proc/net/netstat
-r--r--r-- 1 root root 0 Sep 18 16:26 /proc/net/netstat
$ cat /proc/net/netstat
TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPLossProbes TCPLossProbeRecovery TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo TCPSpuriousRTOs TCPMD5NotFound TCPMD5Unexpected TCPSackShifted TCPSackMerged TCPSackShiftFallback TCPBacklogDrop TCPMinTTLDrop TCPDeferAcceptDrop IPReversePathFilter TCPTimeWaitOverflow TCPReqQFullDoCookies TCPReqQFullDrop TCPRetransFail TCPRcvCoalesce TCPOFOQueue TCPOFODrop TCPOFOMerge TCPChallengeACK TCPSYNChallenge TCPFastOpenActive TCPFastOpenPassive TCPFastOpenPassiveFail TCPFastOpenListenOverflow TCPFastOpenCookieReqd TCPSpuriousRtxHostQueues BusyPollRxPackets
TcpExt: 0 0 828 5266 0 0 0 0 0 0 25027 0 0 0 0 85 1948860 109 23279 0 170 807422 1317512610 13249058936 0 6551001 1197354 4224002 8279131 3 4879 0 0 0 0 3 0 1 157 8790 416 1 419 88 18717 769 121 54185 105713 83035 1 392 1 0 23180 6 64711 6 93 155 0 246 0 0 0 0 13 53213 184 0 0 3 36 190460 0 0 79024 17589 0 0 0 128 595040 22682 0 6 77 45 0 5 0 0 0 10229 0
IpExt: InNoRoutes InTruncatedPkts InMcastPkts OutMcastPkts InBcastPkts OutBcastPkts InOctets OutOctets InMcastOctets OutMcastOctets InBcastOctets OutBcastOctets InCsumErrors InNoECTPkts InECT1Pkts InECT0Pkts InCEPkts
IpExt: 12 0 0 52 582381 52109 448897330878 274484526007 0 2080 59642175 12404543 95 391927770 58 4834 752
$

# 5  
Old 09-18-2015
I can see the file content of cat /proc/net/netstat ,but my question was how to use this information to create some reports which says the speed of the network usage.
# 6  
Old 09-18-2015
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

2. AIX

High Runqueue (R) LOW CPU LOW I/O Low Network Low memory usage

Hello All I have a system running AIX 61 shared uncapped partition (with 11 physical processors, 24 Virtual 72GB of Memory) . The output from NMON, vmstat show a high run queue (60+) for continous periods of time intervals, but NO paging, relatively low I/o (6000) , CPU % is 40, Low network.... (9 Replies)
Discussion started by: IL-Malti
9 Replies

3. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

4. Shell Programming and Scripting

Confused with the usage of one variable usage

Hi All I am not able to understand the usage of d# in the below variable declaration. FILE_LOC contains the directory path And also help me to know about what will be saved in the variable j. Thanks!!! j=${d#${FILE_LOC}/} (2 Replies)
Discussion started by: mohanm
2 Replies

5. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

6. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

7. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

8. Solaris

network driver cpu usage

Hello all, Needed a suggestion from you all, if you know anything about this stuff. We have a high network traffic application. Close to around 700Meg /sec on one NIC. When the traffic is around 200Meg on the NIC, the VCPU(not the CPU, cause we have 24 VCPU) utilization by the NIC driver... (5 Replies)
Discussion started by: Naanu
5 Replies

9. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

10. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
Login or Register to Ask a Question