10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
HI Team,
I am trying to create a shell script to generate a yesterday and today report to compare and email in daily basis. can you please help me on the same.
#!/bin/bash
#Author: *******************
#Description: This script will return the following set of system information:
... (2 Replies)
Discussion started by: Mi4304
2 Replies
2. UNIX for Beginners Questions & Answers
If run the below code today its creating all directory and getting output files,I f run same code tomorrow I am getting error.
can any one give suggestion to sortout this error.
OSError: no such file or directory : '062518'My code looks like this
import paramiko
import sys
import os ... (8 Replies)
Discussion started by: haribabu2229
8 Replies
3. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
4. Shell Programming and Scripting
what does today=${1:-${today}} mean???
I saw a script which has these two lines:
today=`date '+%y%m%d'`
today=${1:-${today}}
but both gives the same value for $today
user:/export/home/user>today=`date '+%y%m%d'`
user:/export/home/user>echo $today
120326... (2 Replies)
Discussion started by: Vidhyaprakash
2 Replies
5. Shell Programming and Scripting
I need to check for 4ht parameter values, if they are not in (17,18) in other words if they r not equal to 17 or 18 then exit.
can u help pls (4 Replies)
Discussion started by: raopatwari
4 Replies
6. Shell Programming and Scripting
Hi All,
I have this script:
#!/bin/ksh
lsvg -l $1|grep -v $1:|grep -v LV|awk '{print "mklvcopy ",$1," 2 $2 $3"}'
I want to pass three param with "vg2 hdisk1 hdisk2" but the output is "mklvcopy lv1 2 $2 $3". I want to pass the hdisk1 and hdisk2 and not the $2 and $3.
Please help!
... (3 Replies)
Discussion started by: itik
3 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I have this script:
#!/bin/ksh
lsvg -l $1|grep -v $1:|grep -v LV|awk '{print "mklvcopy ",$1," 2 $2 $3"}'
I want to pass three param with "vg2 hdisk1 hdisk2" but the output is "mklvcopy lv1 2 $2 $3". I want to pass the hdisk1 and hdisk2 and not the $2 and $3.
Please help!
... (1 Reply)
Discussion started by: itik
1 Replies
8. Shell Programming and Scripting
Hi,
I need to script this:
lsvg -l vg10|grep -v vg10:|grep -v LV|awk '{print "chlv -u 2 ",$1}' > script_vg10.sh
So that I could just pass the parameter of the volume group.
When I did this on a script:
#!/bin/ksh
lsvg -l %1|grep -v %1:|grep -v LV|awk '{print "chlv -u 2",$1}' >... (4 Replies)
Discussion started by: itik
4 Replies
9. HP-UX
Which shows the current kernel settings accurately? kmtune or sysdef. I ask because although some params show the same setting with both, some do not.
Example
>kmtune | grep nfile
nfile 75008 - (15*NPROC+2048)
>sysdef | grep nfile
nfile 75018 ... (6 Replies)
Discussion started by: theninja
6 Replies
10. UNIX for Dummies Questions & Answers
Hello World,
When I issue the errpt command
1581762B 0826133303 T H hdisk1 DISK OPERATION ERROR
C14C511C 0826133303 T H scsi0 ADAPTER ERROR
I found these two unusual errors, wat exactly do these mean ?
Im on an aix box.
Thanks (3 Replies)
Discussion started by: cubicle^dweller
3 Replies
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)