Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sys::statistics::linux::loadavg(3pm) [debian man page]

Sys::Statistics::Linux::LoadAVG(3pm)			User Contributed Perl Documentation		      Sys::Statistics::Linux::LoadAVG(3pm)

NAME
Sys::Statistics::Linux::LoadAVG - Collect linux load average statistics. SYNOPSIS
use Sys::Statistics::Linux::LoadAVG; my $lxs = Sys::Statistics::Linux::LoadAVG->new; my $stat = $lxs->get; DESCRIPTION
Sys::Statistics::Linux::LoadAVG gathers the load average from the virtual /proc filesystem (procfs). For more information read the documentation of the front-end module Sys::Statistics::Linux. LOAD AVERAGE STATISTICS
Generated by /proc/loadavg. avg_1 - The average processor workload of the last minute. avg_5 - The average processor workload of the last five minutes. avg_15 - The average processor workload of the last fifteen minutes. METHODS
new() Call "new()" to create a new object. my $lxs = Sys::Statistics::Linux::LoadAVG->new; It's possible to set the path to the proc filesystem. Sys::Statistics::Linux::LoadAVG->new( files => { # This is the default path => '/proc', loadavg => 'loadavg', } ); get() Call "get()" to get the statistics. "get()" returns the statistics as a hash reference. my $stat = $lxs->get; EXPORTS
No exports. SEE ALSO
proc(5) REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::LoadAVG(3pm)

Check Out this Related Man Page

Sys::Statistics::Linux::SockStats(3pm)			User Contributed Perl Documentation		    Sys::Statistics::Linux::SockStats(3pm)

NAME
Sys::Statistics::Linux::SockStats - Collect linux socket statistics. SYNOPSIS
use Sys::Statistics::Linux::SockStats; my $lxs = Sys::Statistics::Linux::SockStats->new; my $stat = $lxs->get; DESCRIPTION
Sys::Statistics::Linux::SockStats gathers socket statistics from the virtual /proc filesystem (procfs). For more information read the documentation of the front-end module Sys::Statistics::Linux. SOCKET STATISTICS
Generated by /proc/net/sockstat. used - Total number of used sockets. tcp - Number of tcp sockets in use. udp - Number of udp sockets in use. raw - Number of raw sockets in use. ipfrag - Number of ip fragments in use (only available by kernels > 2.2). METHODS
new() Call "new()" to create a new object. my $lxs = Sys::Statistics::Linux::SockStats->new; It's possible to set the path to the proc filesystem. Sys::Statistics::Linux::SockStats->new( files => { # This is the default path => '/proc', sockstat => 'net/sockstat', } ); get() Call "get()" to get the statistics. "get()" returns the statistics as a hash reference. my $stat = $lxs->get; EXPORTS
No exports. SEE ALSO
proc(5) REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::SockStats(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Eating memory

Hello I run Gentoo Linux on my computer: Athlon XP 1700+ ~1,46 mhz 512 mb ram After a while, my computer works really slow, and when I cat /proc/meminfo, I see that I only have 8mb of 512 mb free! How is that possible? I dont run anything I can think of that eats that amount of... (4 Replies)
Discussion started by: Maestin
4 Replies

2. HP-UX

HP-UX & Linux

Hello there! Is Sun Microsystems ready to loose hands on HP-UX in the favor of fast emerging Linux? As HP-UX is very costly both in terms of processor licences and hardware costs. Responses are more than welcome! JAM (4 Replies)
Discussion started by: Jawwad
4 Replies

3. Linux

How to call a proc file from *.c program?

Hi, I am new to Linux programming. As part of learning, I need to create a *.c program where we call certain /proc files (i.e. such as meminfo, version, uptime, etc...) from our program. Can anyone point me to a simple program on how one would do this (i.e. can you directly call uptime() or... (4 Replies)
Discussion started by: pat_and_cami
4 Replies

4. Shell Programming and Scripting

Need to know rhe PID for the Shell Script running

I have a Shell Scritp named "Statistics" which has a Infinate Wille Loop Running I want to restart this Srcipt "Statistics" when i try to run other srcipt Ex "ABC" so i want to kill the "Statistics" script in "ABC" so for this I what to know the PID for that Script "Statistics" which is... (7 Replies)
Discussion started by: pbsrinivas
7 Replies

5. UNIX for Dummies Questions & Answers

Get value from file!!!!

Hi, I'm trying to get the value of load average from the file /proc/loadavg to my script. I'm a bit new to scripting. I need to get the value as an integer type to do a checking. Can anyone help me on what to do to get the value of the current load average into the script? Jibu (13 Replies)
Discussion started by: jibsonline
13 Replies

6. Shell Programming and Scripting

Perl Help

Hi 9:26pm up 551 days, 5:52, 19 users, load average: 1.51, 1.70, 1.77 From the above output i want to extract the last three floating numbers(1.51, 1.70, 1.77) in a perl script. can anybody help how would be regular expression... Reply ASAP :) (4 Replies)
Discussion started by: Harikrishna
4 Replies

7. BSD

Sys V or BSD derivated UNIX

I read it was possible to distinguish if UNIX system on the machine is derivated from Sys V or BSD. The instruction said: ps -ef ... is functional on Sys V ps ax ... is functional on BSD But since I don't have any UNIX machine (just Linux) I can't tell how I may use this knowledge in my... (5 Replies)
Discussion started by: MartyIX
5 Replies

8. AIX

Statistics Aix

Hello If there is a way to get a statistics from Aix box server from a month. cpu use, memory, disc use, etc. Maybe via smitty or I need to do a script. The os is Aix 5.3 Greetings (8 Replies)
Discussion started by: lo-lp-kl
8 Replies

9. Shell Programming and Scripting

Averaging segments

Hi, I have a file that I want to average. So specifically I want to average every third column for each row. Here is an example of my file 2 2 2 3 3 3 1 1 1 5 5 5 Heres what I want it to look like after averaging every third column 2 3 1 5 thanks (11 Replies)
Discussion started by: kylle345
11 Replies

10. UNIX for Dummies Questions & Answers

Calculating average

Hi, i have 12 float variables in a bash file and i want to calculate the average of them. Can any body help? (6 Replies)
Discussion started by: limadario
6 Replies

11. UNIX and Linux Applications

gnuplot average of N curves

Hi I am faced with a situation where I have to plot an curve which is an average of 10 tables. It is not possible to mathematically find an average (which would be correct) because my tables have the time of occurences of events, sometimes events wont occur at similar times in two or more... (3 Replies)
Discussion started by: jamie_123
3 Replies

12. Post Here to Contact Site Administrators and Moderators

Where Are the Games?

Hi! I'm new to the site, and today I clicked on "Banking", curious as to what that was about. Aside from being able to "buy" things with these points, it appears there are some games available, on which you can wager your points. While I could access the "high scores", I could not find the... (14 Replies)
Discussion started by: sudon't
14 Replies

13. Shell Programming and Scripting

Start program depending on processor workload

Hi community, I'm looking for a script/code which starts a shell script with a MPI process depending on: a) the processor workload, i.e. if the workload falls below a certain limit b) alternatively if the previous process finished, e.g. if a process ID disappears I need this for... (3 Replies)
Discussion started by: heunigreenfreak
3 Replies

14. Shell Programming and Scripting

Finding an average

Basically, I need to find average of numbers which are given like: sh average file1 file (in files can be more than one number) ->10 sh average 5 7 ->6 sh average /users/file ->5 echo 5 7 | sh average 6 So basically i wrote my code but it gives me error... I am pretty sure it has to work... (10 Replies)
Discussion started by: Manu1234567
10 Replies

15. SuSE

Post Your /proc/cpuinfo here!

Here is a chance for Linux users to easily compare Linux CPU info and some meaningless BOGOMIPS. Everyone who is running Linux is welcome to: cat /proc/cpuinfo and post the results. Here is the results for www.unix.com: processor : 0 vendor_id : AuthenticAMD cpu family... (182 Replies)
Discussion started by: Neo
182 Replies