Sponsored Content
Top Forums Shell Programming and Scripting Counting average data per hour Post 302372899 by dennis.jacob on Thursday 19th of November 2009 04:13:34 AM
Old 11-19-2009
Quote:
Originally Posted by justbow
Hi Dennis,

I think the average_PCPU for the date 20091116 at hours 08 should be 22.1818
Change the below line in the code according to your required precision. ie, %.4f here

printf "%s %.1f %.1f\n", i,a[1]/a[3],a[2]/a[3]; }
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

generating data for 1 hour

Hi Folks, The reqirement is that i need to generate 1 hr file with a time interval of five minutes.. For ex: my i/p is 0000-0000 and desired o/p is 0000-0005 0005-0010 0010-0015 0015-0020 0020-0025 0025-0030 0030-0035 0040-0045 0050-0055 0055-0100 Script neede urgent ... (0 Replies)
Discussion started by: aajan
0 Replies

2. Shell Programming and Scripting

How can i grep for an hour before data

Hi, My log file is something like this. (08/04/2009 00:27:42.179)(:) aaaaaaaaaaaa (08/04/2009 00:27:42.181)(:) bbbbbbbbbbbbbbbb (08/04/2009 01:00:42.713)(:) cd cdc d ddddsksjdkssksksj (08/04/2009 01:02:42.716)(:) raarrarararararara (08/04/2009 01:07:43.036)(:ERROR) Port... (8 Replies)
Discussion started by: rdhanek
8 Replies

3. UNIX for Advanced & Expert Users

filter last 24 hour data and put in new file

i have file server 1 (filesvr01acess.log) and disc server 1 (discsvr01acess.log) in unix box(say ip adress of the box 10.39.66.81) Similiarly i have file server 2 (filesvr01acess.log) and disc server 2(discsvr01acess.log) in another unix box(say ip adress of the box 10.39.66.82). Now my... (1 Reply)
Discussion started by: nripa1
1 Replies

4. Shell Programming and Scripting

counting word xx referred to a time period, like minute or hour

Hello, I try to insert a post because I've got a trouble to perform a unix job. But I didn't found which steps (procedure) I should follow. Could you help me? I got a log by my Application box, like following: gbosmam037:test >view Log_Server.csv ... (2 Replies)
Discussion started by: maluca68
2 Replies

5. UNIX for Dummies Questions & Answers

Load average spikes once an hour

Hi, I am getting a high load average, around 7, once an hour. It last for about 4 minutes and makes things fairly unusable for this time. How do I find out what is using this. Looking at top the only thing running at the time is md5sum. I have looked at the crontab and there is nothing... (10 Replies)
Discussion started by: sm9ai
10 Replies

6. Shell Programming and Scripting

return counting per hour percentage

We have a monitoring process for a load in unix box, during this process we are writing logs statements for each record, and during this process we are showing the counts per hour. Here is that how we are following log files statements: (just two lines printed here), these statements logged at... (1 Reply)
Discussion started by: skkuchipudi
1 Replies

7. Shell Programming and Scripting

Data counting

I have a large tab delimited text file with 10 columns for example chrM 412 A A 75 0 25 2 ..,AGAATt II chrM 413 G G 72 0 25 4 ..t,,Aag IIIH chrM 414 C C 75 0 25 4 ...a,.. III2 chrM 415 C T 75 75 25 4 TTTt,,,ATC III7 At... (4 Replies)
Discussion started by: Lucky Ali
4 Replies

8. Shell Programming and Scripting

Calculate average for repeated ID within a data

I have an awk script that gives the following output: Average end-to-end transmission delay 2.7 to 5.7 is 0.635392 seconds Average end-to-end transmission delay 2.1 to 5.1 is 0.66272 seconds Average end-to-end transmission delay 2.1 to 5.1 is 0.691712 seconds Average end-to-end transmission... (4 Replies)
Discussion started by: ENG_MOHD
4 Replies

9. Shell Programming and Scripting

Average of multiple time-stamped data every half hour

Hi All, Thank you for reading through my post and helping me figure out how I would be able to perform this task. For example: I have a list of continuous output collected into a file in the format as seen below: Date...........Time........C....A......... B ==========================... (5 Replies)
Discussion started by: terrychen
5 Replies

10. UNIX for Advanced & Expert Users

Want to get average value for each hour

I want to get CPU average value only (not required user CPU & memory) with each hours on individual date. The sample output is below | | | User |Memory| User | Date | Time |CPU %|CPU % | % |Mem % | 03/02/2015|00:00:00| 24.56| 20.66| 89.75| 63.48|... (13 Replies)
Discussion started by: Saravanan_0074
13 Replies
LOGCONV.PL(1)						      General Commands Manual						     LOGCONV.PL(1)

NAME
logconv.pl - analyzes Directory Server access log files SYNOPSIS
logconv.pl [-h] [-d <rootDN>] [-s <size limit>] [-v] [-V] [-S <start time>] [-E <end time>] [-efcibaltnxgjuU] [ access log ... ... ] DESCRIPTION
Analyzes Directory Server access log files for specific information defined on the command line OPTIONS
A summary of options is included below: -h, --help help/usage -d, --rootDN <Directory Managers DN> DEFAULT -> cn=directory manager -D, --data <Location for temporary data files> DEFAULT -> /tmp TIP -> If there is not enough RAM, a RAM disk can be used instead: mkdir /dev/shm/logconv, and use this directory for the "-D" value. -s, --sizeLimit <Number of results to return per category> DEFAULT -> 20 -X, --excludeIP <IP address to exclude from connection stats> E.g. Load balancers -v, --version show version of tool Print version of the tool -S, --startTime <time to begin analyzing logfile from> Time to begin analyzing logfile from E.g. [28/Mar/2002:13:14:22 -0800] -E, --endTime <time to stop analyzing logfile> Time to stop analyzing logfile from E.g. [28/Mar/2002:13:24:62 -0800] -M, --reportFileMins <CSV output file> This option creates a CSV report for spreadsheets. -m, --reportFileSecs <CSV output file> This option creates a CSV report for spreadsheets. -B, --bind <ALL | ANONYMOUS | Bind DN > This generates a report based on either ALL bind dn's, anonymous binds, or a specific DN. -V, --verbose <enable verbose output - includes all stats listed below except U> Verbose output -[efcibaltnxgjuU] e Error Code stats f Failed Login Stats c Connection Code Stats i Client Stats b Bind Stats a Search Base Stats l Search Filter Stats t Etime Stats n Nentries Stats x Extended Operations r Most Requested Attribute Stats g Abandoned Operation Stats j Recommendations u Unindexed Search Stats (very detailed) y Connection Latency Stats p Open Connection ID Stats U Unindexed Search Summary USAGE
Examples: logconv.pl -s 10 -V access logconv.pl -d "cn=directory manager" /export/server4/slapd-host/logs/access* logconv.pl -s 50 -ibgju access* logconv.pl -S "[28/Mar/2002:13:14:22 -0800]" -E "[28/Mar/2002:13:50:05 -0800]" -e access AUTHOR
logconv.pl was written by the 389 Project. REPORTING BUGS
Report bugs to http://bugzilla.redhat.com. COPYRIGHT
Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. Copyright (C) 2008 Red Hat, Inc. This manual page was written by Michele Baldessari <michele@pupazzo.org>, for the Debian project (but may be used by others). This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. May 18, 2008 LOGCONV.PL(1)
All times are GMT -4. The time now is 03:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy