Sponsored Content
Full Discussion: To find out the logs count
Top Forums Shell Programming and Scripting To find out the logs count Post 302330458 by rakeshawasthi on Wednesday 1st of July 2009 09:45:28 AM
Old 07-01-2009
Ok
redirect this output to a file
output > new_File
for counting did you mean the first field greater than 100?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find logs

hi friends, how do i modify the "find" command to search for large files with *.log extension along with a mtime parameter for files that are 30days, 1yr, 2yr old . please help my dear friends, thanks in advance (2 Replies)
Discussion started by: cromohawk
2 Replies

2. Shell Programming and Scripting

How to find the password in the logs and remove the log which indicate it.

I want to crypt my files but as you know I have to write the password in the xterm...as you know there is a log where every thing I write in the xterm are store on it..how can I get the logs and delete the record which indicate my password..or prevent the xterm from storing my password in the... (2 Replies)
Discussion started by: ahmad.diab
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

To find latest set of logs among new and old

Hi All I am writing a script which will select the latest logs (which are generated every night via a script) among old one and new. Script generates set of 3 logs each time it runs. Example : log-WedJun082011_bkt1.log log-WedJun082011_bkt2.log log-WedJun082011_bkt3.log I have... (1 Reply)
Discussion started by: ratneshnagori
1 Replies

5. Shell Programming and Scripting

Count number of errors within logs for last 6 months

I have directory /test/logs which has multiple logs: audit.log audit.log.1 audit.log.2 audit.log.3 audit.log.4 audit.log.5 audit.log is current log file and audit.log.X are archive log files. I need to search within these log files and count word "error-5" logged within last 6 months... (4 Replies)
Discussion started by: djanu
4 Replies

6. Shell Programming and Scripting

Pattern count on rotating logs for the past 1 Hr

Hi All, I have a requirement to write a shell script to search the logs in past 1 hour and extract some pattern from it and count it cumulatively to a file. The problem which I'm facing here is - logs rotates on size basis, say if size of log reaches 5 MB then new log will be generated and... (7 Replies)
Discussion started by: Gem_In_I
7 Replies

7. Shell Programming and Scripting

Find logs between two timestamp

Suppose there are log entries like 16 Jul 2012 11:46:45,628 SendToClientService ExecuteThread: '256' for queue: 'weblogic.kernel.Default (self-tuning)': Received an unknown fault. 16 Jul 2012 11:47:45,650 SendToClientService ExecuteThread: '256' for queue: 'weblogic.kernel.Default... (4 Replies)
Discussion started by: snehasish_jana
4 Replies

8. UNIX for Dummies Questions & Answers

How to Find zipped logs?

from time to time, I received an alert, let's call it "alert_name"but in order to run the script that loads the missing data, I need to check firs if the logs have been zipped out, how can I do this? I Know: 1.- Name of the alert. 2.- Server where it runs. (4 Replies)
Discussion started by: JLo5621
4 Replies

9. UNIX for Beginners Questions & Answers

How to count respon time max min avg for nginx logs?

Hi All, need your help, i want count respon time max and average my nginx logs, based on hourly or minutes per api... my nginx.log sample : 10.1.1.1 - - "POST /v2/api/find/outlet/ HTTP/1.1" 200 2667 "-" "okhttp/3.12.0" "118.215.153.47" 0.178 0.178 . 10.1.1.1 - - "POST... (4 Replies)
Discussion started by: fajar_3t3
4 Replies

10. UNIX for Beginners Questions & Answers

How to find the count of IP addresses that belong to different subnets and display the count?

Hi, I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output Here is how my file looks like 1.1.1.1 1.1.1.2 1.1.1.3 1.1.2.1 1.1.2.2 1.1.3.1 1.1.3.2 1.1.3.3 1.1.3.4 So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
ocount(1)						      General Commands Manual							 ocount(1)

NAME
ocount - Event counting tool for Linux SYNOPSIS
ocount [ options ] [ --system-wide | --process-list <pids> | --thread-list <tids> | --cpu-list <cpus> [ command [ args ] ] ] DESCRIPTION
ocount is an OProfile tool that can be used to count native hardware events occurring in either a given application, a set of processes or threads, a subset of active system processors, or the entire system. The data collected during a counting session is displayed to stdout by default or, optionally, to a file. When counting multiple events, the kernel may not be able to count all events simultaneously and, thus, may need to multiplex the counting of the events. If this happens, the "Percent time enabled" column in the ocount output will be less than 100, but counts are scaled up to a 100% estimated value. RUN MODES
One (and only one) of the following run modes must be specified. If you run ocount using a run mode other than command [args] , press Ctrl-c to stop ocount when finished counting (e.g., when the monitored process ends). If you background ocount (i.e., with '&') while using one these run modes, you must stop it in a controlled manner so that the data collection process can be shut down cleanly and final results can be displayed. Use kill -SIGINT <ocount-PID> for this purpose. command [args] The command is the application for which to count events. args are the input arguments required by the application. The command and its arguments must be positioned at the end of the command line, after all ocount options. --process-list / -p pids Use this option to count events for one or more already-running applications, specified via a comma-separated list ( pids ). Event counts will be collected for all children of the passed process(es) as well. --thread-list / -r tids Use this option to count events for one or more already-running threads, specified via a comma-separated list ( tids ). Event counts will not be collected for any children of the passed thread(s). --system-wide / -s This option is for counting events for all processes running on your system. You must have root authority to run ocount in this mode. --cpu-list / -C cpus This option is for counting events on a subset of processors on your system. You must have root authority to run ocount in this mode. This is a comma-separated list, where each element in the list may be either a single processor number or a range of processor numbers; for example: '-C 2,3,4-11,15'. OTHER OPTIONS
--events / -e event1[,event2[,...]] This option is for passing a comma-separated list of event specifications for counting. Each event spec is of the form: name[:unitmask[:kernel[:user]]] Note: Do not include a count value in the event spec, as that parameter is only need when profiling. You can specify unit mask values using either a numerical value (hex values must begin with "0x") or a symbolic name (if the name=<um_name> field is shown in the ophelp output). For some named unit masks, the hex value is not unique; thus, OProfile tools enforce specifying such unit masks value by name. If no unit mask is specified, the default unit mask value for the event is used. Event names for certain processor types include a _GRP<n> suffix. For such cases, the --events option may be specified with or without the _GRP<n> suffix. When no event specification is given, the default event for the running processor type will be used for counting. Use ophelp to list the available events for your processor type. --separate-thread / -t This option can be used in conjunction with either the --process-list or --thread-list option to display event counts on a per- thread (per-process) basis. Without this option, all counts are aggregated. NOTE: If new threads are started by the process(es) being monitored after counting begins, the counts for those threads are aggre- gated with their parent's counts. --separate-cpu / -c This option can be used in conjunction with either the --system-wide or --cpu-list option to display event counts on a per-cpu basis. Without this option, all counts are aggregated. --time-interval / -i num_seconds[:num_intervals] Results collected for each time interval are printed every num_seconds instead of the default of one dump of cumulative event counts at the end of the run. If num_intervals is specified, ocount exits after the specified number of intervals occur. --brief-format / -b Use this option to print results in the following brief format: [optional cpu or thread,]<event_name>,<count>,<percent_time_enabled> [ <int> ,]< string >,< u64 >,< double > If --timer-interval is specified, a separate line formatted as timestamp,<num_seconds_since_epoch> is printed ahead of each dump of event counts. --output-file / -f outfile_name Results are written to outfile_name instead of interactively to the terminal. --verbose / -V Use this option to increase the verbosity of the output. --version / -v Show ocount version. --help / -h Display brief usage message. --usage / -u Display brief usage message. EXAMPLE
$ ocount make VERSION
This man page is current for oprofile-0.9.9. SEE ALSO
operf(1). oprofile 0.9.9 Tue 10 June 2014 ocount(1)
All times are GMT -4. The time now is 12:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy