11-12-2006
I tried that, and I too got the same result. I think it would be due to buffered I/O, but I am not sure. I tried using 'sync' but there still wasn't any output in the file. Maybe the shell is doing some sort of internal buffering...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
We like to know if there is a way to report the sar -q per processor on AIX 4.3 .
Please help
RGDS,Elie. (1 Reply)
Discussion started by: eyounes
1 Replies
2. Shell Programming and Scripting
Hello,
I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^
Here is what I'm trying to achieve :
file1:
test filea 3495;
test fileb 4578;
test filec 7689;
test filey 9978;
test filez 12300;
file2:
test filea... (11 Replies)
Discussion started by: mecano
11 Replies
3. Shell Programming and Scripting
Hi All,
i tried sar command the output appears to be for several days
I would like to just see today's SAR output: Please advice me.
$sar
Linux 2.6.9-67.ELsmp (lrtp50) 02/28/09
00:00:01 CPU %user %nice %system %iowait %idle
00:05:02 all 3.10... (4 Replies)
Discussion started by: raghur77
4 Replies
4. Solaris
Hi,
Anyone knows how to extract sar command output to excel or Is there any free grapical tools to extract this sar log file. thanks, regards (2 Replies)
Discussion started by: vijill
2 Replies
5. Solaris
I was reviewing yesterday's sar file and came across this strange output! What in the world? Any reason why there's output like that?
SunOS unixbox 5.10 Generic_144488-07 sun4v sparc SUNW,T5240 Solaris
00:00:58 device %busy avque r+w/s blks/s avwait avserv
11:20:01 ... (4 Replies)
Discussion started by: dangral
4 Replies
6. UNIX for Advanced & Expert Users
Can someone explain the correlation between how sar names the disk drives and how the rest of the OS names the disk drives?
sar lists my disk drives as sd0, sd1, sd2, etc.....
while format lists my disk drives as c1t0d0, c1t1d0, c1t2d0,etc...
And also why sar shows 8 disks but format... (2 Replies)
Discussion started by: s ladd
2 Replies
7. Red Hat
Hi
I am unable to view the output of sar file using below command
sar -f sar07, it is showing below error.
Invalid system activity file: sar07 (0x920)
above file is in location /var/log/sa
wheather for memory it is creating the file at different location? (1 Reply)
Discussion started by: manoj.solaris
1 Replies
8. Solaris
One of my servers giving all zero sar output. Could anyone explain this behaviour.
Thanks
CHaandana
Sample:
10:43:37 %usr %sys %wio %idle
16:15:01 2 1 0 97
16:20:02 2 1 0 97
16:25:02 2 1 0 97
16:30:01 ... (3 Replies)
Discussion started by: chaandana
3 Replies
9. Solaris
We're experiencing some intermittent freezes on one of our systems and I'm trying to figure out what is happening.
We're running Solaris 10 zones mounting shares from netapp through nfs.
On the zone that freezes we have sar running and are getting this output:
SunOS prodserver 5.10... (3 Replies)
Discussion started by: Jyda
3 Replies
10. Red Hat
I am facing situation where sar -u command is showing 0 for all cps, so does it mean all the cpus are fully utilized, os is oracle Linux 6.8
01:34:13 PM all 0 0 0 0 0.00 0 (2 Replies)
Discussion started by: manoj.solaris
2 Replies
LEARN ABOUT SUNOS
setlinebuf
setbuffer(3C) Standard C Library Functions setbuffer(3C)
NAME
setbuffer, setlinebuf - assign buffering to a stream
SYNOPSIS
#include <stdio.h>
void setbuffer(FILE *iop, char *abuf, size_t asize);
int setlinebuf(FILE *iop);
DESCRIPTION
The setbuffer() and setlinebuf() functions assign buffering to a stream. The three types of buffering available are unbuffered, block
buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as writ-
ten; when it is block buffered, many characters are saved and written as a block; when it is line buffered, characters are saved until
either a NEWLINE is encountered or input is read from stdin. The fflush(3C) function may be used to force the block out early. Normally all
files are block buffered. A buffer is obtained from malloc(3C) upon the first getc(3C) or putc(3C) performed on the file. If the standard
stream stdout refers to a terminal, it is line buffered. The standard stream stderr is unbuffered by default.
The setbuffer() function can be used after a stream iop has been opened but before it is read or written. It uses the character array abuf
whose size is determined by the asize argument instead of an automatically allocated buffer. If abuf is the null pointer, input/output
will be completely unbuffered. A manifest constant BUFSIZ, defined in the <stdio.h> header, tells how large an array is needed:
char buf[BUFSIZ];
The setlinebuf() function is used to change the buffering on a stream from block buffered or unbuffered to line buffered. Unlike set-
buffer(), it can be used at any time that the stream iop is active.
A stream can be changed from unbuffered or line buffered to block buffered by using freopen(3C). A stream can be changed from block
buffered or line buffered to unbuffered by using freopen(3C) followed by setbuf(3C) with a buffer argument of NULL.
RETURN VALUES
The setlinebuf() function returns no useful value.
SEE ALSO
malloc(3C), fclose(3C), fopen(3C), fread(3C), getc(3C), printf(3C), putc(3C), puts(3C), setbuf(3C), setvbuf(3C)
NOTES
A common source of error is allocating buffer space as an "automatic" variable in a code block, and then failing to close the stream in the
same block.
SunOS 5.10 13 May 1997 setbuffer(3C)