I had different problem scenarios with IF statement. Can any expert please enlighten me on the difference with these scenarios. Thank you.
1st Scenario:
testdate=`date +%Y%m`
test=`cat /var/log/database0.$testdate*.log | grep "Errors found during processing" | tail -10`
if
then
... (4 Replies)
New to scripting in general, so patience plz. If I ask a stupid question or don't get it, I thank you for your kindness in advance.
That said, did a for i loops checks to see if a PB* file is there but I need to know two things before I copy the file.
I need to know if the file's create date... (2 Replies)
I am kind of new in Unix and i have to make a menu. I want to put an if statement in the menu. you should enter the filename and it goes to that file. How do i do this? (1 Reply)
HI Unix Gurus,
I have a number of SELECT count(*) statements in an input file and I want to execute it using a shell script but one by one using loop in script....
How can I do this..... (7 Replies)
1. The problem statement, all variables and given/known data:
Two problems I need solving please. I created a script where the user types in 7 numbers as standard input and each one is then stored in an array. Now I need to perform the following calculations on those numbers:
1) Use a while... (11 Replies)
Hello. I am new here and new to scripting. I used to have a very basic script that worked for simple backup/restore of files. I have expanded it and well... I have ended up with a complete mess. It still backs up and restores but there is so many issues that stem from the many if statements I... (3 Replies)
Bash shell, variables i and rem are working fine in 2 separate for loops, but I'd like to consolidate them like this:
for && This gives syntax error on &&.
Thanks in advance for direction. (5 Replies)
Say I have a for loop that parse through a file....Say it look for the colors red and blue in sections of the file. Say it find red before it find blue in the file.
Say I have two if statements in the for loop
Something like if blue is found print blue is my favorite color is the first if... (7 Replies)
Discussion started by: scj2012
7 Replies
LEARN ABOUT OSF1
iostat
iostat(1) General Commands Manual iostat(1)NAME
iostat - Reports I/O statistics
SYNOPSIS
iostat [drive...] [interval] [count]
OPERANDS
Forces iostat to display specific drives. If drive is not specified (or the specified drive does not exist on the system or cluster,
iostat displays the first two drives (even if more than two disk drives are configured in the system). Causes iostat to report once each
interval seconds. The first report is for all time since the system was last booted, and each subsequent report is for the last interval
only.The value must not be 0. Specifies the number of reports. For example, iostat 1 10 would produce 10 reports at 1-second intervals.
You cannot specify count without interval because the first numeric argument to iostat is assumed to be interval.
DESCRIPTION
The iostat command reports the following information: For terminals (collectively), the number of characters read and written per second.
For each disk, the number of transfers per second and bytes transferred per second (in kilobytes). For the system, the percentage of time
the system has spent in user mode, in user mode running low priority (nice) processes, in system mode, and idling.
To compute this information, iostat counts data transfer completions, the number of words transferred for each disk, and the collective
number of input and output characters for terminals. Also, each sixtieth of a second, iostat examines the state of each disk and makes a
tally if the disk is active.
When you issue an iostat command on a cluster member, it displays statistics only for those disks that are local to the member and that
member's usage of those shared disks that it has mounted. It displays 0 for other disks in the cluster (those it doesn't have mounted),
regardless of whether they are on the shared bus or are local to some other member.
EXAMPLES
The output from this example displays cpu, terminal, and disk statistics for the first two disks on the system providing 5 reports at 1
second intervals:
# iostat 1 5
tty floppy1 dsk9 cpu
tin tout bps tps bps tps us ni sy id
0 3 0 0 0 0 1 0 4 95
4 58 0 0 0 0 1 0 2 97
1 53 0 0 0 0 0 0 2 98
5 59 0 0 0 0 1 0 1 98
6 60 0 0 0 0 1 0 2 97
The second example specifies device names in the command:
# iostat dsk2 dsk3 cdrom2
tty dsk2 cdrom2 dsk3 cpu
tin tout bps tps bps tps bps tps us ni sy id
0 13 11 5 5 2 2427 1213 0 1 1 98
SEE ALSO Commands:vmstat(1)iostat(1)