Operating System - HP-UX
1821545 Members
2178 Online
109633 Solutions
New Discussion юеВ

Re: wtmp convert native mode to text format

 
Chui Kock You_1
Frequent Advisor

wtmp convert native mode to text format



How HP unix can send the sulog and shutdownlog out to Windows Server for our software to read. Secondly, how can we convert the wtmp and btmp from native mode to text format and send out to Windows Server.
7 REPLIES 7
TTr
Honored Contributor

Re: wtmp convert native mode to text format

Use the fwtmp command. "man fwtmp"
Oviwan
Honored Contributor

Re: wtmp convert native mode to text format

the last or lastb command reads the wtmp and btmp files. check manpage. so you can redirect the output of last to a file:
last > read_wtmp

HTH
James R. Ferguson
Acclaimed Contributor

Re: wtmp convert native mode to text format

Hi:

For transforming either the 'wtmp' or 'btmp' *binary* files to ASCII text ones, do:

# /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp

Regards!

...JRF...

Chui Kock You_1
Frequent Advisor

Re: wtmp convert native mode to text format

Hi,

Do you had the command line for fwtmp.

Regards
Chui
Dennis Handly
Acclaimed Contributor

Re: wtmp convert native mode to text format

>Do you had the command line for fwtmp.

JRF showed you how to use fwtmp. You can also process the wtmps files with -X:
/usr/sbin/acct/fwtmp -X < /var/adm/wtmps > /tmp/wtmps
Chui Kock You_1
Frequent Advisor

Re: wtmp convert native mode to text format

Hi,

Do you had an agent or self written script to send them to our software or have a program to grab them automatically.

Regards
Chui
Suraj K Sankari
Honored Contributor

Re: wtmp convert native mode to text format

Hi,
You can take output like this
last >/tmp/last.out
or
lastb >/tmp/lastb.out

Suraj