08-07-2008
log report script
Hello everyone,
By any chance, anyone has a script (shell) that I can modify for the following:
I have daily log files and they look like:
Accept aabbcc [02/Jun/2008:10:34:36 -0600] "111.11.111.111 uid=MyID, ou=People, o=helloworld.com" "webagent" [] []
Reject aabbcc [02/Jun/2008:10:34:36 -0600] "111.11.111.111 uid=MyID, ou=People, o=helloworld.com" "webagent" [] []
Validate ddeeff [02/Jun/2008:10:34:36 -0600] "111.11.111.111 uid=MyID, ou=People, o=helloworld.com" "webagent" [] []
The need is to run a script against it with some inputs, such as:
./script.sh uid start_date end_date all_dates
above may not contain the end_date; but eventually there should be sometimes.
The output should be something like this:
# Total Activities based on uid
uid=aabbcc
Accept: #
Reject: #
Validate: #
uid=ddeeff
Accept: #
Reject: #
Validate: #
so on... If anyone can help, greatly appreciated.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Expert,
I have some confusing to generate report from the log file as shown below:
filename :test1.log
start_time date end_time number code
P 000029.621 20070823 000029 12134567890 111111111111 00 0 000 003... (4 Replies)
Discussion started by: bucci
4 Replies
2. Shell Programming and Scripting
Hi,
I need a shell program that will prompt the user to input a dept name to the script.
The script should then check a specific directory called ‘report' in the home directory of each member of that dept.
If the report directory does not exist, or there are no contents in the directory,... (2 Replies)
Discussion started by: johnnyvlme
2 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
Discussion started by: itian2010
0 Replies
4. Shell Programming and Scripting
:):):):):) (0 Replies)
Discussion started by: bryan101
0 Replies
5. Shell Programming and Scripting
I'm not too fluent at this and having problems comprehending / coming up with a way to do it. Our telephone system is spitting out call information on it's maintenance (serial) port which i have connected to a linux box. I want to be able to monitor the output of this text and when a 911 call is... (1 Reply)
Discussion started by: Pythong
1 Replies
6. Shell Programming and Scripting
Hi Gurus,
I've log files like below:
extint.performance.log.2014-04-10-00-00-00.13
extint.performance.log.2014-04-11-00-00-00.12
extint.performance.log.2014-04-12-00-00-00.12
extint.performance.log.2014-04-12-14-35-11.11
extint.performance.log.2014-04-13-00-00-00.10... (4 Replies)
Discussion started by: VasuKukkapalli
4 Replies
7. Shell Programming and Scripting
Hi,
I need to develop a bash script to create customized report from the server log (red hat 5.8 64 bit Operating system). The following is one of the log for our internal application task.
<2015.03.03 20:09:52 274 +0800><I><DSCTH01><http-0.0.0.0-443-2><security> GUI request succeeded for... (1 Reply)
Discussion started by: pugazhendhi_r
1 Replies
8. Shell Programming and Scripting
The log file is huge and lot of information, i would like to parse and make a report .
below is the log file looks like:
REPORT DATE: Mon Aug 10 04:16:17 CDT 2017
SYSTEN VER: v1.3.0.9
TERMINAL TYPE: prod
SYSTEM: nb11cu51
UPTIME: 04:16AM up 182 days 57 mins min
MODEL, TYPE, and SN:... (8 Replies)
Discussion started by: amir07
8 Replies
9. Shell Programming and Scripting
I have a log file that looks like this. the lines are grouped. 2 lines per entry.
M: 2019-01-25 13:02:31.698 P25, received network transmission from KI4EKI to TG 10282
M: 2019-01-25 13:02:35.694 P25, network end of transmission, 4.3 seconds, 1% packet loss
M: 2019-01-25 13:02:38.893 P25,... (7 Replies)
Discussion started by: ae4ml
7 Replies
10. UNIX for Beginners Questions & Answers
Hi all
I have a unix script that generates a report with the following information:
uptime, mounted file systems, disk usage (> 90% --> critical, <75%-90%> --> warning, < 75% healthy), Mem usage, CPU usage and load average.
But I would like to create one single report containing all this... (5 Replies)
Discussion started by: fretagi
5 Replies
LEARN ABOUT DEBIAN
sysstat
SYSSTAT(5) Linux User's Manual SYSSTAT(5)
NAME
sysstat - sysstat configuration file.
DESCRIPTION
This file is read by sa1(8) and sa2(8) shell scripts from the sysstat's set of tools. It consists of a sequence of shell variable assign-
ments used to configure sysstat logging. The variables and their meanings are:
HISTORY
The number of days during which a daily data file or a report should be kept. Data files or reports older than this number of days
will be removed by the sa2(8) shell script.
COMPRESSAFTER
Number of days after which daily data files are to be compressed, either by gzip or bzip2.
SADC_OPTIONS
Options that should be passed to sadc(8). With these options (see sadc(8) manual page), you can select some additional data which
are going to be saved in daily data files. These options are used only when a new data file is created. They will be ignored with
an already existing one.
FILES
/etc/sysstat/sysstat
AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
SEE ALSO
sadc(8), sa1(8), sa2(8)
http://pagesperso-orange.fr/sebastien.godard/
Linux SEPTEMBER 2010 SYSSTAT(5)