08-04-2011
Hi,
Author of the
ckwtmpx program mentioned above here.
Quote:
wtmpfix does actually fix truncated entries too
This is correct. However there were a couple of things that I found sub-optimal:
1.
wtmpfix(1M) is too aggressive. I have a test corrupt
wtmpx file as "found in the wild" of 6.7M. Processing with
wtmpfix discards 6.3M of data.
ckwtmpx on the other hand discards 742 _bytes_ and the resulting file certainly appears valid (it processes correctly with
last(1) or
fwtmp(1M), no errors, no truncation).
- wtmpfix's re-alignment jumps forward by one record plus however many bytes remain after removing a complete number of records from the file (the residue in the source quoted above). ckwtmpx's strategy is to crawl forward byte by byte.
- ckwtmpx's strategy to check "does this look like a valid record?" is less complex (strict?). See is_record_valid() in ckwtmpx.c (apparently I can't yet post URLs...).
2.
wtmpfix doesn't show what was discarded. I was interested in trying to work out where the corruption was coming from (
ckwtmpx -e error_file). This didn't help. I know it isn't always lack of disk, and it isn't
LARGEFILE (which I once suspected). The 742 byte example I quoted above contains (almost) two corrupt "system down" records with far too many NULL bytes.
Any problems with
ckwtmpx, suggestions, patches, please hit me by email,
mcarpenter@free.fr. Thanks!
This User Gave Thanks to mcarpenter For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hey, I'm trying to create the command that will create a file named user.txt that contains the output of the command cut -d: -f1,5 /etc/passwd, and displays itself afterwards.
I don't know how to bridge cat > user.txt with cut -d: -f1,5 /etc/passwd, or how display it afterwards. Any help would... (2 Replies)
Discussion started by: raidkridley
2 Replies
2. Shell Programming and Scripting
Hi All,
can anyone tell me what is wrong with this command.
tail -f /opt/olr-logs/PaymentGateway.log | grep "DEBUG - Start! AkhtarPaymentGateway - generateChecksum" | awk '{print $13}' | sed 's/,//g'>> abc
But I found nothing in the file abc
Please do help me.or Provide me some... (8 Replies)
Discussion started by: akhtar.bhat
8 Replies
3. UNIX for Advanced & Expert Users
i am trying to find the files which are more than 100MB and it was created 10 days ago.
find /lola/loaded -size +102400 -mtime -10 -print | xargs ls -ltr
-rw-rw-r-- 1 lola_adm gdrmp 82054170 Jun 23 06:17 /lola/loaded/ILMEMBER20090622.txt
-rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24... (3 Replies)
Discussion started by: sudhiroracle
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I try to using the below command to find out all the datafiles under "sja"
direcotory.
$ xargs -i find {} -type f -ls < sja
/bin/ksh: sja: cannot open
so can you tell me what is wrong?
Thanks
Jerry (3 Replies)
Discussion started by: GreatJerry
3 Replies
5. UNIX for Advanced & Expert Users
Hello,
I'm having a problem with xbindkeys giving the wrong mapping information, hence I can't get it work at all when trying new mappings from this machine.
From another computer, I have some definitions for xbindkeys (made with xbindkeys-config). These key codes work correctly on this... (0 Replies)
Discussion started by: Narnie
0 Replies
6. AIX
I faced an interesting problem on my AIX servers. When I checked last logins with command last I saw that hostnames are wrong. Let say, I made login from workstation xxxxx and with the command last I saw:
root pts/2 yyyyy 5 jan 15:38 still logged in
Ping xxxxx and ping... (3 Replies)
Discussion started by: giovanni
3 Replies
7. Shell Programming and Scripting
Hi all,
I'm trying to run the following command to get all files in one directory to another with the files' timestamps preserved,
cp -p /logs/dvgbiau/batch/* /logs/dvgbiau/tmp_batch
Note that ./batch and ./tmp_batch are two sub-directories under /logs/dvgbiau.
The error was,... (1 Reply)
Discussion started by: isaacniu
1 Replies
8. UNIX for Dummies Questions & Answers
Options::
A)$shell
B)echo $ bash
C)echo $ O
D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies
9. Shell Programming and Scripting
I use things like this a lot in ksh and bash, but lately bash has been printing the command for every loop:
... | while read f
do
if
then
echo Differ "$f"
fi
done
How to prevent this? (5 Replies)
Discussion started by: DGPickett
5 Replies
10. UNIX for Beginners Questions & Answers
I want to create a shell script to gather user account information and displays the result to administrator.
I have created a script but its showing all the information when i search for username like:
amit@mx:~$ ./uinfo.sh amit
Username : amit
User Info ... (2 Replies)
Discussion started by: amit1986
2 Replies
cvcd(1M) System Administration Commands cvcd(1M)
NAME
cvcd - virtual console daemon
SYNOPSIS
/platform/platform_name/cvcd
DESCRIPTION
The virtual console daemon, cvcd, is a server process that supports the network console provided on some platforms. The cvcd daemon accepts
network console connections from a remote host (only one host at any given time). Console input is read from this connection and forwarded
to cvc(7D) by way of cvcredir(7D).
Similarly, console output is read from cvcredir(7D) and forwarded across the network console connection. If cvcd dies, console traffic is
automatically rerouted through an internal hardware interface.
The cvcd daemon normally starts at system boot time. Each domain supports only one cvcd process at a time.
Caution: On Sun Enterprise 10000 domains, cvcd uses a configuration file (/etc/ssphostname) to determine the name of the host from
which network console connections are allowed. If the remote console host is renamed, you must edit the configuration file
to reflect that change.
OPERANDS
The following operands are supported:
platform_name The official Sun platform name used in packaging and code. For example, for Sun Fire 15K servers, the platform_name
would be SUNW,Sun-Fire-15000.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |Sun Enterprise 10000 |
| |servers, Sun Fire High-End |
| |Systems |
+-----------------------------+-----------------------------+
|Availability |SUNWcvc.u |
+-----------------------------+-----------------------------+
SEE ALSO
svcs(1), svcadm(1M), services(4), attributes(5), smf(5), cvc(7D), cvcredir(7D)
Sun Enterprise 10000 SSP Reference Manual
System Management Services (SMS) Reference Manual
NOTES
The cvcd service is managed by the service management facility, smf(5), under the service identifier:
svc:/system/cvc
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser-
vice's status can be queried using the svcs(1) command.
SunOS 5.10 11 Aug 2004 cvcd(1M)