Sponsored Content
Full Discussion: Request per second script
Top Forums Shell Programming and Scripting Request per second script Post 302991859 by Katkota on Friday 17th of February 2017 12:25:17 AM
Old 02-17-2017
Sorry for not posting some of the log files.. Here it's below.. What i'm looking for is to get the highest requests per seconds "mostly will be lines per second" for each log file and append the output to a file.
The output needs to include the log file name and the highest request per second in that log file

Code:
#Fields: date time time-taken c-ip cs-username cs-auth-group x-exception-id sc-filter-result cs-categories cs(Referer) sc-status s-action cs-method
 rs(Content-Type) cs-uri-scheme cs-host cs-uri-port cs-uri-path cs-uri-query cs-uri-extension cs(User-Agent) s-ip sc-bytes cs-bytes x-virus-id x-bl
uecoat-application-name x-bluecoat-application-operation
#Remark: 1412140034 "lofnetsg1" "192.168.13.14" "main"
2017-02-15 17:49:06 8 10.23.53.112 - - - OBSERVED "Technology/Internet" -  404 TCP_NC_MISS GET text/html;%20charset=iso-8859-1 http dci.sophosupd.c
om 80 /osxhe/d/16/d16e39472e867bf7f8407db13d3502b5.dat - dat "Sophos%20AutoUpdate/ CFNetwork/760.6.3 Darwin/15.6.0 (x86_64)" 192.168.13.14 437 243
- "none" "none"
2017-02-15 17:49:06 578 10.4.33.22 - - - OBSERVED "Web Ads/Analytics" -  200 TCP_TUNNELED CONNECT - tcp tpc.googlesyndication.com 443 / - - "Mozill
a/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko" 192.168.13.14 21106 2873 - "none" "none"
2017-02-15 17:49:06 17 10.17.87.27 - - - OBSERVED "Web Ads/Analytics" -  200 TCP_NC_MISS GET - http t.lkqd.net 80 /t ?ev=147&tsid=132117&env=3&cb=7
43590466414&format=0&did=2&osid=2&pubtagtype=lkqd-formats&render=html5&apt=auto&uimp=6944564170577988928&svrs=0.45&srvid=10.10.4.214&oip=134.174.21
.158&vrs=197&tsl=13827&ear=0&width=300&height=250&phost=&host=reuters.com&appname=&idfa=&aid=&bundleid=&lsid=&loclat=&loclong=&contentid=&contentti
tle=&contentlength=&contenturl=&appstoreurl=&execution=inbanner&placement=&browserid=1&adplayersize=small&pid=326&sid=150846&spid=18106&psid=&ppid=
&lkqdtagtype=platform-connection&tlr=0&adid=127634&asrc=15817&dealid=117723&c1=&c2=&c3=&tsia=8945&tssa=&rnd=157089284&cs=3668523497 - "Mozilla/5.0
(Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 192.168.13.14 290 1534 - "none" "none"
2017-02-15 17:49:06 669 10.23.112.63 - - - OBSERVED "Radio/Audio Streams" -  200 TCP_MISS GET audio/x-aac http primary.hls-streaming.production.str
eaming.siriusxm.com 80 /AAC_Data/broadwaysbest/HLS_broadwaysbest_64k_v3/broadwaysbest_64k_1_021560803727_00310913_v3.aac ?consumer=k2&gupId=BE4A750
32FEC2FF7293A7F5C0FAEFEA3 aac "SXMLiveAudioPlayer/1485824608 CFNetwork/808.3 Darwin/16.3.0" 192.168.13.14 79798 1119 - "none" "none"
2017-02-15 17:49:06 32 10.64.5.81 - - - OBSERVED "Web Ads/Analytics" Error
.html  200 TCP_NC_MISS GET text/javascript http beacon.krxd.net 80 /optout_check ?callback=Krux.ns._default.kxjsonp_optOutCheck - "Mozilla/5.0 (Win
dows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 192.168.13.14 635 451 - "none" "none"

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix script http request

Hi everybody, I have a *.vbs file which I want to run automatically. I want to know if there is anyway to implement the given example for e.g "http://255.255.255.55/script.vbs" what I mean is does anyone know how to make an http request from a unix script?? Thanks in advance!!!!!!!!!!! (1 Reply)
Discussion started by: arksal
1 Replies

2. UNIX for Advanced & Expert Users

Using a request script

I am creating a package(Solaris10 on sparc) that needs user input. As I understand it, I need to use a request script. My problem is that the value I set in my request script is not visible in my postinstall script. Not sure if I am doing it right. Here is an example request script... (4 Replies)
Discussion started by: Tornado
4 Replies

3. UNIX for Advanced & Expert Users

How to modify BASEDIR with request script?

Here is request script: #!/bin/sh echo "Current install root path is " CONFIRM="n" while do BASEDIR="" while true do echo please input install root path then press : read BASEDIR if then echo... (6 Replies)
Discussion started by: kingpmp
6 Replies

4. Shell Programming and Scripting

Solaris request script

Hi, In the request script I need to read user input and store to variable to use it later in postinstall script. e.g. LOGDIR=/app/log echo "Please type the Log Directory : (current value: $LOGDIR)" read LOGDIR When asked, if the user enters a value the parameter is ok and I... (2 Replies)
Discussion started by: potro
2 Replies

5. Shell Programming and Scripting

Timing out lynx request in a bash script

I have a Bash script where, in a loop, I access several urls. Sometimes, if an url is not available, lynx hangs, and the script does not continue. How can I time out the lynx request when it takes more than, 10 Seconds, but continue with the other jobs... For some reason lynx does not care... (1 Reply)
Discussion started by: lowmaster
1 Replies

6. Shell Programming and Scripting

Request a script on manupilating the data. Please HELP!

Dear friends, I'm struggling to preparing a bunch of gaussian input files, say manually. It's really a time-consuming work without any techniques. I suppose that it could be done by a smart script automatically. But I lack some basic knowledge on scripting. Please help! My original input... (4 Replies)
Discussion started by: liuzhencc
4 Replies

7. Shell Programming and Scripting

Request for help with SGE submission script manipulation

Hi, I have the following SGE submission (HPC calculation) script, which is just a Bash script: #!/bin/bash -l #$ -S /bin/bash #$ -l h_rt=1:00:0 #$ -l mem=4G #$ -N XXX #$ -pe qlc 24 #$ -P XXX #$ -wd /home/uccaxxx/Scratch/222PdT/3vac/c0001/ mpirun -m $TMPDIR/machines -np $NSLOTS... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies

8. Shell Programming and Scripting

Shell script request

I've a master file which will contain 100 file names, The script should read file name from a master file and format the file as below in AIX. input file Filename This is a test file Output File Filename|This is a test file Thanks in advance for file in $FileList; do (5 Replies)
Discussion started by: udayakumar
5 Replies

9. Shell Programming and Scripting

Formatting wget request within script

When using a browser and calling this url .. the data returns the proper range of information ichart dot finance dot yahoo dot com/table.csv?s=YAHOO&a=3&b=14&c=2012&d=03&e=20&f=2012&g=d&ignore.csv (geeze wont let me post url's sorry ) However in my script the formatting is messing up on... (4 Replies)
Discussion started by: harte
4 Replies
CMDTEST(1)						      General Commands Manual							CMDTEST(1)

NAME
cmdtest - blackbox testing of Unix command line tools SYNOPSIS
cmdtest [-c=COMMAND] [--command=COMMAND] [--config=FILE] [--dump-config] [--dump-memory-profile=METHOD] [--dump-setting-names] [--generate-manpage=TEMPLATE] [-h] [--help] [-k] [--keep] [--list-config-files] [--log=FILE] [--log-keep=N] [--log-level=LEVEL] [--log-max=SIZE] [--no-default-configs] [--output=FILE] [-t=TEST] [--test=TEST] [--timings] [--version] [FILE]... DESCRIPTION
cmdtest black box tests Unix command line tools. Given some test scripts, their inputs, and expected outputs, it verifies that the command line produces the expected output. If not, it reports problems, and shows the differences. Each test case foo consists of the following files: foo.script a script to run the test (this is required) foo.stdin the file fed to standard input foo.stdout the expected output to the standard output foo.stderr the expected output to the standard error foo.exit the expected exit code foo.setup a shell script to run before the test foo.teardown a shell script to run after test Usually, a single test is not enough. All tests are put into the same directory, and they may share some setup and teardown code: setup-once a shell script to run once, before any tests setup a shell script to run before each test teardown a shell script to run after each test teardown-once a shell script to run once, after all tests cmdtest is given the name of the directory with all the tests, or several such directories, and it does the following: o execute setup-once o for each test case (unique prefix foo): -- execute setup -- execute foo.setup -- execute the command, by running foo.script, and redirecting standard input to come from foo.stdin, and capturing standard output and error and exit codes -- execute foo.teardown -- execute teardown -- report result of test: does exit code match foo.exit, standard output match foo.stdout, and standard error match foo.stderr? o execute teardown-once Except for foo.script, all of these files are optional. If a setup or teardown script is missing, it is simply not executed. If one of the standard input, output, or error files is missing, it is treated as if it were empty. If the exit code file is missing, it is treated as if it specified an exit code of zero. The shell scripts may use the following environment variables: DATADIR a temporary directory where files may be created by the test TESTNAME name of the current test (will be empty for setup-once and teardown-once) SRCDIR directory from which cmdtest was launched OPTIONS
-c, --command=COMMAND ignored for backwards compatibility --config=FILE add FILE to config files --dump-config write out the entire current configuration --dump-memory-profile=METHOD make memory profiling dumps using METHOD, which is one of: none, simple, meliae, or heapy (default: simple) --dump-setting-names write out all names of settings and quit --generate-manpage=TEMPLATE fill in manual page TEMPLATE -h, --help show this help message and exit -k, --keep keep temporary data on failure --list-config-files list all possible config files --log=FILE write log entries to FILE (default is to not write log files at all); use "syslog" to log to system log --log-keep=N keep last N logs (10) --log-level=LEVEL log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug) --log-max=SIZE rotate logs larger than SIZE, zero for never (default: 0) --no-default-configs clear list of configuration files to read --output=FILE write output to FILE, instead of standard output -t, --test=TEST run only TEST (can be given many times) --timings report how long each test takes --version show program's version number and exit EXAMPLE
To test that the echo(1) command outputs the expected string, create a file called echo-tests/hello.script containing the following con- tent: #!/bin/sh echo hello, world Also create the file echo-tests/hello.stdout containing: hello, world Then you can run the tests: $ cmdtest echo-tests test 1/1 1/1 tests OK, 0 failures If you change the stdout file to be something else, cmdtest will report the differences: $ cmdtest echo-tests FAIL: hello: stdout diff: --- echo-tests/hello.stdout 2011-09-11 19:14:47 +0100 +++ echo-tests/hello.stdout-actual 2011-09-11 19:14:49 +0100 @@ -1 +1 @@ -something else +hello, world test 1/1 0/1 tests OK, 1 failures Furthermore, the echo-tests directory will contain the actual output files, and diffs from the expected files. If one of the actual output files is actually correct, you can actualy rename it to be the expected file. Actually, that's a very convenient way of creating the ex- pected output files: you run the test, fixing things, until you've manually checked the actual output is correct, then you rename the file. SEE ALSO
cliapp(5). CMDTEST(1)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy