Sponsored Content
Full Discussion: how to calculate busy hour
Top Forums Shell Programming and Scripting how to calculate busy hour Post 302162107 by shary on Monday 28th of January 2008 04:11:48 AM
Old 01-28-2008
Dear All,

I am giving u the actual file but its seperated by "," comma.
all field actually separted by comma can u do this for this file

HOURS AccRq SucAcc FailAcc SucAccStart
0 18301 18301 0 18368
1 9412 9412 0 9452
2 7697 7697 0 7730
3 5060 5060 0 5068
4 3960 3960 0 3972
5 3837 3837 0 3851
6 5047 5047 0 5069
7 6102 6102 0 6124
8 8361 8361 0 8377
9 10183 10183 0 10206
10 14669 14669 0 14706
11 16577 16577 0 16622
12 12347 12347 0 12383
13 9040 9040 0 9067
14 8051 8051 0 8074
15 10818 10818 0 10792
16 20399 20399 0 20453
17 41259 41259 0 41514
18 36523 36523 0 36825
19 13581 13581 0 13734
20 12576 12576 0 12685
21 11332 11332 0 11432
22 13457 13457 0 13583
23 10898 10898 0 10996

output should be

BUSY HOUR =17
i am calculating on the basis of second field which is accrq and the highest value is 41259 against that walue the hour is 17.
so kindly tell me the script which can give me the output

BUSY HOUR =17
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

an hour less in 24 hour system

My program: __________________________________ #!/bin/ksh DAY=`date +%y%m%d` H=`date +%H` M=`date +%M` day=`date +%m/%d/%y` let h=$H-1 echo DAY $DAY echo H $H echo M $M echo day $day echo h $h _____________________________________ My result: (3 Replies)
Discussion started by: bobo
3 Replies

2. UNIX for Advanced & Expert Users

Filesystem mystery: disks are not busy on one machine, very busy on a similar box

Hi, We have a filesystem mystery on our hands. Given: 2 machines, A and Aa. Machine Aa is the problem machine. Machine A is running Ubuntu, kernel 2.6.22.9 #1 SMP Wed Feb 20 08:46:16 CST 2008 x86_64 GNU/Linux. Machine Aa is running RHEL5.3, kernel 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38... (2 Replies)
Discussion started by: mschwage
2 Replies

3. Shell Programming and Scripting

Grep string from logs of last 1 hour on files of 2 different servers and calculate count

Hi, I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows: 27-Aug-2010... (4 Replies)
Discussion started by: poweroflinux
4 Replies

4. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

5. Linux

How to Calculate Disk Queue length and Disk Busy Time

Hi, Am doing an enhancements related to monitoring a Linux disk I/O statistics. The /proc/diskstats file is used to get the each disk I/O statistics. But, It returns the raw value. How to calculate the Disk Queue Length and Disk Busy time from the raw values. Guide me. (1 Reply)
Discussion started by: maruthu
1 Replies

6. Shell Programming and Scripting

Calculate total of log by hour

Hi, Just wondering, is there anyway I can get the total of logs generated by hours ? Let say I have these logs, Sep 23 04:48:43 hsbcufs: NOTICE: realloccg /: file system full Sep 23 04:48:47 hsbcufs: NOTICE: alloc: /: file system full Sep 23 04:48:51 hsbcufs: NOTICE: realloccg /: file... (14 Replies)
Discussion started by: dehetoxic
14 Replies

7. Shell Programming and Scripting

How to convert 24 hour time to 12 hour timing?

Hi friends, I want to convert 24 hour timing to 12 hour please help me... my data file looks like this.. 13-Nov-2011 13:27:36 15.32044 72.68502 13-Nov-2011 12:08:31 15.31291 72.69807 16-Nov-2011 01:16:54 15.30844 72.74028 15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Discussion started by: nex_asp
13 Replies
ppp.Dialers(4)						     Kernel Interfaces Manual						    ppp.Dialers(4)

NAME
ppp.Dialers - PPP dialer description file format DESCRIPTION
The file describes how to dial each type of modem attached to the UNIX system that is to be made available for outbound PPP calls. exam- ines it when placing a call to a neighboring machine. When selects a line from it uses the field to select an entry in from which it uses the field to select an entry in then interprets the field from that dialer description. Format Entries are one to a line; blank lines are ignored. Comments begin with a and extend to the end of the line. Upper/lower case distinc- tions in the dialer field are significant for matching purposes, as are strings in the chat script. Fields on a line are separated by hor- izontal white space (blanks or tabs). If a chat script ends with a backslash the next line is considered a continuation of the chat script. Continuations may only occur in the midst of a chat script. Each entry must contain these fields, in this order: dialer The name of this dialer, to be matched against the dialer field in chat-script A description of the conversation that holds with the modem. Chat Script Particulars A chat script takes the form of a space-separated list of expect-send pairs. Each pair consists (at minimum) of a field to expect the end to send, then a field to send in response. Unless a string ends with will follow it by sending a carriage return character (ASCII 0x0d). Chat scripts are or where the following the hyphen is executed if the preceding fails to match received text. Certain special words may be used in the chat script to control the behavior of as it attempts to dial. Both ABORT and TIMEOUT must be in the phase of the chat script. If sees abort-string while executing the remainder of the chat script, abort the dialing attempt and note the failure in the log file. While executing the current chat script, wait timeout-time seconds for a response before considering the dialing attempt to have timed out. Writes have a fixed 60-second timeout. The expect-send couplet of 'sets the line parity accordingly: Set transmission parity based on the parity observed in characters received in strings. This is the default. Transmit characters with the parity bit set to zero (8 bits, no parity). Transmit characters with the parity bit set to one. Transmit characters with even parity. Transmit characters with odd parity. In the midst of either an string or a string, gets translated into the appropriate control character, and gets translated into x. Other special sequences are: Send or receive a space character (ASCII 0x20). Send or receive a horizontal tab character (ASCII 0x09). Send or receive a line feed character (ASCII 0x0a). Send or receive a carriage return character (ASCII 0x0d). Send or receive a backslash character (ASCII 0x5c). Send or receive a carat character (ASCII 0x5e). Send or receive the single character Ctrl-character (ASCII 0x00 through 0x1f). Send or receive a character, specified in octal digits. Pause for .25 second before proceeding (send only). Delay for two seconds before proceeding (send only). Send a break (.25 second of zero bits). Disable hangups (sets CLOCAL or LNOHANG). enable hangups (unsets CLOCAL or LNOHANG) (the default). Don't append a carriage return character after sending the preceding string (send only). Don't print succeeding send strings (e.g., a password) in any debugging or logging output. Subsequent sequences toggle mode. Insert the telephone number (found in the fifth field of here. EXAMPLES
# # Dialers - PPP dialers file # #Dialer Chat script T1600 ABORT NOsCARRIER ABORT NOsDIALTONE ABORT BUSY ABORT RRING RRING RRING ABORT ERROR TIMEOUT 5 "" AT OK-AT-OK ATS111=0DTT TIMEOUT 30 CONNECT # T2500-PEP ABORT NOsCARRIER ABORT NOsDIALTONE ABORT BUSY ABORT RRING RRING RRING ABORT ERROR TIMEOUT 5 "" AT OK-AT-OK ATS111=0DTT TIMEOUT 30 CONNECTsFAST # USRv32bis ABORT ERROR ABORT NOsANSWER ABORT NOsCARRIER ABORT BUSY ABORT RRING RRING RRING ABORT NOsDIALsTONE TIMEOUT 5 "" AT&F OK-ATQ0-OK ATB0E0X7&B1&H1&I0&K3&R2&S1 OK-AT-OK ATS01=1S02=255S19=0 OK-AT-OK ATDTT TIMEOUT 30 CONNECT AUTHOR
was developed by the Progressive Systems. SEE ALSO
pppd(1), ppp.Auth(4), ppp.Devices(4), ppp.Filter(4), ppp.Keys(4), ppp.Systems(4). RFC 1055. RFC 1144, RFC 1332, RFC 1548, ppp.Dialers(4)
All times are GMT -4. The time now is 10:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy