Sponsored Content
Top Forums Programming change time interval for /proc/loadavg calculation Post 302071321 by Rakesh Ranjan on Friday 14th of April 2006 01:23:00 PM
Old 04-14-2006
change time interval for average load calculation

Hi friends, I need to find average load on my server. The problem would have been quite simple had I required the load averaged over 1 min,5 min or 15 min which I can easily find reading /proc/loadavg (the same as shown by 'uptime') but my requirement compels me to find load averaged over 10 sec or 20 sec.

I went through the linux source code (esp. linux/include/linux/sched.h, linux/fs/proc/proc_misc.c, linux/kernel/timer.c) these gave me an idea that may be changing EXP_1, EXP_5, EXP_15 might help my case but I want to be sure if I'm thinking is right also I want to be careful that I don't effect other things.
Thanks for any help.

Last edited by Rakesh Ranjan; 04-14-2006 at 04:14 PM.. Reason: calculation mistake corrected
 

10 More Discussions You Might Find Interesting

1. Solaris

Time Wait interval

What is the time_wait interval for Solaris 8/9??? and is it configurable??? For example sometimes a clients pc will freeze up dropping the connection, closing the port. The problem is on our side our system still thinks their logged in (until it realizes it dropped on the otherside and drops on... (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Shell Programming and Scripting

Generating files with time interval of fifteen minutes

Hi Guys, I have two dates as start date and end date.. i need to generate files within these two dates with time interval of half an hour.... i.e. Start Date=25/09/07 12:00:00 End Date=26/09/07 12:00:00 Now i need to generate files every half an... (0 Replies)
Discussion started by: aajan
0 Replies

3. Shell Programming and Scripting

To extract data of a perticular interval (date-time wise)

I want a shell script which extract data from a log file which contains date and time-wise data and i need the data for a perticular interval of time...what can i do??? (3 Replies)
Discussion started by: abhishek27
3 Replies

4. Shell Programming and Scripting

script to run repeatedly after a fixed interval of time

Hi , I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose. #!/bin/sh diff common.log... (3 Replies)
Discussion started by: himvat
3 Replies

5. UNIX for Dummies Questions & Answers

Time Calculation

I have a file with over 100,000 lines of data with looking to compare times of about 2000 lines to get a total time of a process. The lines of unique data are as follows. FINER: CacSoapServer:reserveNetworkResource got the sessionID and INFO: Created CAC session ID The command... (5 Replies)
Discussion started by: bpfoster76
5 Replies

6. UNIX for Dummies Questions & Answers

Run script in the background with a time interval

I have a script I want to run in the background, and I have looked it up but I am not exactly sure how to do. First of all to run it in the background do you have to put something in the script or is it just a command when you go to run it. I found this solution to it but once again I am not to... (2 Replies)
Discussion started by: mauler123
2 Replies

7. UNIX for Dummies Questions & Answers

Copying files between two time interval

Hi All, I am new to this forum.... Can neone please help me how to copy files between two time intervals i.e. I need to copy files from 6.30 to 9.30 on 5th June 09. Any help is appreciated. (2 Replies)
Discussion started by: Pratik4891
2 Replies

8. Shell Programming and Scripting

How to run a script everyday between 7 and 8 pm with the time interval of 5 minutes?

Hi, Can someone help me in running a cronjob everyday between 7 and 8 pm with the time interval of 5 minutes in between to repeat that script. The script is so small and I need that to run daily between this time. Please if possible provide me the syntax for this logic. Thanks. (4 Replies)
Discussion started by: cya
4 Replies

9. Shell Programming and Scripting

Mailing a file at a particular time interval

Folks, I need to send a .log file to my email for every one hour from a server that too only in a particular time period. Is awk mandate here? or can we do it in shell scripting only? Please help me in sorting this out. Cheers, Arun (3 Replies)
Discussion started by: ArunJanga
3 Replies

10. Shell Programming and Scripting

How to send mail at specific calculated time interval?

Hi All, I want to send an email if the time difference from previous mail sent is more than or equal to 30 mins. I have written below code and it's working fine. In this script I am storing previous mail sent time in txt file. Instead of storing in txt file how to store in a variable.... (8 Replies)
Discussion started by: nalu
8 Replies
LINUX(4)						   BSD Kernel Interfaces Manual 						  LINUX(4)

NAME
linux -- Linux ABI support SYNOPSIS
To compile support for this ABI into an i386 kernel place the following line in your kernel configuration file: options COMPAT_LINUX for an amd64 kernel use: options COMPAT_LINUX32 Alternatively, to load the ABI as a module at boot time, place the following line in loader.conf(5): linux_load="YES" DESCRIPTION
The linux module provides limited Linux ABI (application binary interface) compatibility for userland applications. The module provides the following significant facilities: o An image activator for correctly branded elf(5) executable images o Special signal handling for activated images o Linux to native system call translation It is important to note that the Linux ABI support it not provided through an emulator. Rather, a true (albeit limited) ABI implementation is provided. The following sysctl(8) tunable variables are available: compat.linux.osname Linux kernel operating system name. compat.linux.osrelease Linux kernel operating system release. Changing this to something else is discouraged on non-development systems, because it may change the way Linux programs work. Recent versions of GNU libc are known to use different syscalls depending on the value of this sysctl. compat.linux.oss_version Linux Open Sound System version. The linux module can be linked into the kernel statically with the COMPAT_LINUX kernel configuration option or loaded as required. The fol- lowing command will load the module if it is neither linked into the kernel nor already loaded as a module: if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then kldload linux > /dev/null 2>&1 fi Note that dynamically linked Linux executables will require a suitable environment in /compat/linux. Specifically, the Linux run-time linker's hints files should be correctly initialized. For this reason, it is common to execute the following commands to prepare the system to correctly run Linux executables: if [ -x /compat/linux/sbin/ldconfig ]; then /compat/linux/sbin/ldconfig -r /compat/linux fi For information on loading the linux kernel loadable module automatically on system startup, see rc.conf(5). This information applies regardless of whether the linux module is statically linked into the kernel or loaded as a module. FILES
/compat/linux minimal Linux run-time environment /compat/linux/proc limited Linux process file system /compat/linux/sys limited Linux system file system SEE ALSO
brandelf(1), elf(5), linprocfs(5), linsysfs(5) HISTORY
Linux ABI support first appeared in FreeBSD 2.1. BSD
February 8, 2010 BSD
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy