sar (binary)file format solaris

  • Follow


Hi,

Any one know how is sar binary format? I need this for my application...

Best Regards,
Andrzej Zywiczynski


0
Reply Solaris 7/21/2004 3:50:00 PM

In article <cdm3at$thd$1@news.dialog.net.pl>,
	"Solaris" <az@a.pl> writes:
> Hi,
> 
> Any one know how is sar binary format? I need this for my application...

Undocumented.  I think the format has changed at least once over the
years, and I suspect that one of the reasons it isn't documented is
because they (Sun and other commercial Unix vendors) want the freedom to
change it without having folks depend on it directly.  I don't remember,
but some of what I've seen suggests it may have changed from Solaris 8 to
Solaris 9, and possibly also somewhere between 2.6 and 8.

Not the first time someone has asked...I think the same question appeared
here a few years ago.

struct sysinfo (<sys/sysinfo.h>) is an important part of it, but there's
plenty more in there too.  The last of the fixed part is a count of the
I/O devices for which additional data follows.  That needs to be checked
for each fixed part read in, because I/O devices may be added or removed
over time.

With enough work, you could probably figure it out, _but_ remember that
the format could change at any future patch and break your application.

It looks like most or all of the data can be obtained via the kstat
interface; see the libkstat man page and all the others it refers to.
(that still won't tell you the format, but it will probably tell you
how to get most of the same data)

Probably most people that want what you're asking for either write
their own collector or parse the text output of sar.

At one time, SCO, together with starnix.com, was supposed to release
an open version of sar that would split it into two parts: a generic
sar and an OS-specific data collection library (not that it would've
necessarily related to what sar on Solaris does).  But as far as I can
determine, nothing ever came of that, except that SCO implemented libmas
for themselves.

-- 
mailto:rlhamil@smart.net  http://www.smart.net/~rlhamil
0
Reply Richard 7/21/2004 11:12:40 PM


Solaris <az@a.pl> wrote:
> Any one know how is sar binary format? I need this for my application...

It's not documented, and is considered an unsupported interface. What's
more, it changes every now and again (and of course, the sar binary is
updated to also support the changes).

If you want to use the data the best idea is to run sar -A and then parse
the text data it returns.

  Scott
0
Reply Scott 7/22/2004 12:41:27 PM

Thanks a lot for yours suggestions...
AZ

U�ytkownik "Solaris" <az@a.pl> napisa� w wiadomo�ci
news:cdm3at$thd$1@news.dialog.net.pl...
> Hi,
>
> Any one know how is sar binary format? I need this for my application...
>
> Best Regards,
> Andrzej Zywiczynski
>
>


0
Reply Andrzej 7/25/2004 1:05:47 PM

3 Replies
558 Views

(page loaded in 0.068 seconds)

Similiar Articles:













7/23/2012 1:04:08 PM


Reply: