yep yep it works fine to show the timestamp correctly but after that i wish to do a grep on my log file counting XX alarms like so :
for i in $(seq 0 $HOUR); do printf "%s %02d:\n" "$DATE" "$i"; printf $(grep "$DATE $i:" $LOGFILE | grep -i alarm_type1 | wc-l); done
but if i do this, the grep line would use the $i variable as 1 instead of 01.
My logfile timestamp being "Feb 28 HH:MM:SS" It would grep nothing on "Feb 28 1:"
Hi,
Normally, I will manually to use "ll" command to list the following file from \FILE\CACHE\ directory and check the jump seq. Can I write a script to loop or/and check jump seq file (if jumped seq and show "missing seq no" message for me)
-rw-rw----+ 1 user develop 14012 Sep 4... (1 Reply)
Hi guys. i have the following script:
1 #!/bin/bash
2 linkcount=$(grep "/portal" tickets | wc -l)
3 grep "/portal" tickets > links
4 for i in $(seq 1 $linkcount); do
5 echo "BLYAT"
6 let link$i=$(sed -n "$i"p links)
7 echo $
8 done
the problem is, that "let" can`t... (1 Reply)
Hi all. Im trying to use a sequence in a while loop like this below. I need it for navigating a year, month, day folder structure where a user can input the start date and have it go to the desired end date. The script will grab a certain file on each day then move onto the next. Ive got all that... (3 Replies)
I usually just browse the forum/google for answers, however I've been stuck on a problem for a number of hours now and I've decided to join up and actually ask I've searched the forum ad naseum in an attempt to find answer to my query, however so far I have been unsuccessful.
I'm no expert... (3 Replies)
Assuming one does not have such luxuries as bash, zsh, jot, rs, perl, etc. what is the most elegant way to print out a formatted date series like this:
01-01-2010
01-02-2010
01-03-2010
...
02-01-2010
02-02-2010
...
Can I accomplish this with just basic shell builtins and seq, or... (3 Replies)
i have something like this
tablesName="abc def hij akn ... etc etc"
count=0
for i in $tablesName
do
echo -en "\b\b\b\b\b\b\b\b\b\b\b\b\bTableCount: $count"
count=`expr $count + 1`
done
the above is just a description wha i need is when the loop executes
the... (1 Reply)
I am processing RNA-seq data files that have been aligned using RUM. One of the output files is a *.sam that includes:
Unique alignments
Non-unique alignments
original read files
I want to extract only the unique alignments by pulling out alignments that have "IH:i:1" (indicates this read... (2 Replies)
Hi! I'm trying to do this:
1 -
2 -
3 -
4 -
5 -
I'm using seq for this:
seq 1 20 > filename.txt
How do I get the "-"? I've tried -f per man but can't get anything to work. Also, is there an easier or better way than using sequence? Thanks! (6 Replies)
Discussion started by: TonyBe
6 Replies
LEARN ABOUT CENTOS
auvirt
AUVIRT(8) System Administration Utilities AUVIRT(8)NAME
auvirt - a program that shows data related to virtual machines
SYNOPSIS
auvirt [ OPTIONS ]
DESCRIPTION
auvirt shows a list of guest sessions found in the audit logs. If a guest is specified, only the events related to that guest is consid-
ered. To specify a guest, both UUID or VM name can be given.
For each guest session the tool prints a record with the domain name, the user that started the guest, the time when the guest was started
and the time when the guest was stoped.
If the option "--all-events" is given a more detailed output is shown. In this mode other records are shown for guest's stops, resource
assignments, host shutdowns and AVC and anomaly events. The first field indicates the event type and can have the following values: start,
stop, res, avc, anom and down (for host shutdowns).
Resource assignments have the additional fields: resource type, reason and resource. And AVC records have the following additional fields:
operation, result, command and target.
By default, auvirt reads records from the system audit log file. But --stdin and --file options can be specified to change this behavior.
OPTIONS --all-events
Show records for all virtualization related events.
--debug
Print debug messages to standard output.
-f, --file file
Read records from the given file instead from the system audit log file.
-h, --help
Print help message and exit.
--proof
Add after each event a line containing all the identifiers of the audit records used to calculate the event. Each identifier con-
sists of unix time, milliseconds and serial number.
--show-uuid
Add the guest's UUID to each record.
--stdin
Read records from the standard input instead from the system audit log file. This option cannot be specified with --file.
--summary
Print a summary with information about the events found. The summary contains the considered range of time, the number of guest
starts and stops, the number of resource assignments, the number of AVC and anomaly events, the number of host shutdowns and the
number of failed operations.
-te, --end [end-date] [end-time]
Search for events with time stamps equal to or before the given end time. The format of end time depends on your locale. If the date
is omitted, today is assumed. If the time is omitted, now is assumed. Use 24 hour clock time rather than AM or PM to specify time.
An example date using the en_US.utf8 locale is 09/03/2009. An example of time is 18:00:00. The date format accepted is influenced by
the LC_TIME environmental variable.
You may also use the word: now, recent, today, yesterday, this-week, week-ago, this-month, this-year. Today means starting now.
Recent is 10 minutes ago. Yesterday is 1 second after midnight the previous day. This-week means starting 1 second after midnight
on day 0 of the week determined by your locale (see localtime). This-month means 1 second after midnight on day 1 of the month.
This-year means the 1 second after midnight on the first day of the first month.
-ts, --start [start-date] [start-time]
Search for events with time stamps equal to or after the given end time. The format of end time depends on your locale. If the date
is omitted, today is assumed. If the time is omitted, midnight is assumed. Use 24 hour clock time rather than AM or PM to specify
time. An example date using the en_US.utf8 locale is 09/03/2009. An example of time is 18:00:00. The date format accepted is influ-
enced by the LC_TIME environmental variable.
You may also use the word: now, recent, today, yesterday, this-week, this-month, this-year. Today means starting at 1 second after
midnight. Recent is 10 minutes ago. Yesterday is 1 second after midnight the previous day. This-week means starting 1 second after
midnight on day 0 of the week determined by your locale (see localtime). This-month means 1 second after midnight on day 1 of the
month. This-year means the 1 second after midnight on the first day of the first month.
-u, --uuid UUID
Only show events related to the guest with the given UUID.
-v, --vm name
Only show events related to the guest with the given name.
EXAMPLES
To see all the records in this month for a guest
auvirt --start this-month --vm GuestVmName --all-events
SEE ALSO aulast(8), ausearch(8), aureport(8).
AUTHOR
Marcelo Cerri
IBM Corp Dec 2011 AUVIRT(8)