Tracelogger-like tool for netinfo?

Hi all,

Is there an opportunity to automatically log netinfo events to disk,
like what ‘tracelogger’ does to the trace event buffer? It would be
quite handy, but docs say nothing about this.

Thanks,

  • Nick

Nikolai Gorbunov <n.gorbunov@swd.ru> wrote:
: Hi all,

: Is there an opportunity to automatically log netinfo events to disk,
: like what ‘tracelogger’ does to the trace event buffer? It would be
: quite handy, but docs say nothing about this.

: Thanks,
: - Nick


You can have a script which redirects the output to a file

netinfo >> netinfo.txt

Then, if you want to do this every hour or so, you can put the script
in a cron job.

Donald

\


Donald Lalonde
OEM Support Liaison
QNX Software Systems Ltd.
mailto: donaldl@qnx.com http://qdn.qnx.com
Build a more reliable world

The QNX Real Time Platform is now available
Get it a http://get.qnx.com

: Is there an opportunity to automatically log netinfo events to
disk,
: like what ‘tracelogger’ does to the trace event buffer? It would
be
: quite handy, but docs say nothing about this.

You can have a script which redirects the output to a file

netinfo >> netinfo.txt

Then, if you want to do this every hour or so, you can put the
script
in a cron job.

That’s fine, but whatever the cron period is, the event buffer will
have enough chances to overflow if a lot of events arise. Tracelogger
writes trace buffer to disk when a watermark is reached, this is more
reasonable. Why doesn’t netinfo have anything similar?

  • Nick

Nikolai Gorbunov <n.gorbunov@swd.ru> wrote:

: Is there an opportunity to automatically log netinfo events to
disk,
: like what ‘tracelogger’ does to the trace event buffer? It would
be
: quite handy, but docs say nothing about this.

You can have a script which redirects the output to a file

netinfo >> netinfo.txt

Then, if you want to do this every hour or so, you can put the
script
in a cron job.

That’s fine, but whatever the cron period is, the event buffer will
have enough chances to overflow if a lot of events arise. Tracelogger

(and if it doesn’t overflow, you’ll get duplicates in your output –
there is no way to clear the netinfo event log…)

writes trace buffer to disk when a watermark is reached, this is more
reasonable. Why doesn’t netinfo have anything similar?

it is the default for Net to log events to both the netinfo log
and the traceinfo log. (see -T option for Net)

That’s fine, but whatever the cron period is, the event buffer
will
have enough chances to overflow if a lot of events arise.
Tracelogger

(and if it doesn’t overflow, you’ll get duplicates in your output –
there is no way to clear the netinfo event log…)

Yes, I forgot to mention this argument, sorry. :slight_smile:

writes trace buffer to disk when a watermark is reached, this is
more
reasonable. Why doesn’t netinfo have anything similar?

it is the default for Net to log events to both the netinfo log
and the traceinfo log. (see -T option for Net)

Bingo! I didn’t know the events registered in both logs are exactlty
the same, I thought the event flow is splitted somehow between those
two logs. Does this mean that “netinfo” actually equals to
“traceinfo -M 4”?

  • Nick

Nikolai Gorbunov <n.gorbunov@swd.ru> wrote:

Bingo! I didn’t know the events registered in both logs are exactlty
the same, I thought the event flow is splitted somehow between those
two logs. Does this mean that “netinfo” actually equals to
“traceinfo -M 4”?

The explanations in the netinfo are often a bit clearer than the ones
in the traceinfo file, but they are essentially the same.

Also, you can re-start Net with a bigger event buffer without rebooting
your system if you are trying to catch Net stuff.

-David