09-24-2003
Hmm, what would you define as a corrupted file? How would you know if something is corrupt? Since everything in Unix is just a file, I dont think you can say that one file is corrupt vs another file without evaluating its attributes. If its a binary, then running it would tell you that its corrupt when it fails. Capture the return code after its execution. Anything non-zero would imply an issue.
Can you clarify what you mean?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I've got a corrupted tar file with some filename being like ?a=n is it possible to get them repaired? (1 Reply)
Discussion started by: klintsovi
1 Replies
2. HP-UX
Good Day
Our HP box was hacked and the passwd file has been altered,there are only 2 user accounts active,and these dont have any administrative rights.I need to edit the passwd file to correct the su and root entries.
Does any body have any suggestions as to how i can do this with out the root... (10 Replies)
Discussion started by: cantona7
10 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am new to UNIX, and have recently installed Suse 9.3. I have been experimenting with all of the commands and have somehow managed to modify the default shell of the root user to an invalid file. Consequently I cannot su to the root user as I receive the 'no such file or directory' error... (2 Replies)
Discussion started by: Tony Montana
2 Replies
4. HP-UX
Hello!
Do you know the meaning of...
"crw-rw---- 1 informix informix 64 0x020001 Jan 21 2004 rifxroot"
I don't know what the first "c" means. Furthermor, if I try to copy this file (rifxroot) it appears a message:
"cp: cannot open rifxroot: No such device or address"
I don't... (1 Reply)
Discussion started by: kaugrs
1 Replies
5. UNIX for Dummies Questions & Answers
Preparing for a move to a new server, I needed to offload about somewhat over a gigabyte of newsfeeds that my website collects, and that I had been saving on the server. I tarred them and zipped them into about a dozen smaller files of about 150Mb each. All seemed well. I downloaded them onto my... (3 Replies)
Discussion started by: JohnTinker
3 Replies
6. Solaris
Hi,
We were facing cron job failures and raised a case to our UNIX team, they fixed the issue and said cron job failures due to root mail file corruption.
My questions are,
1. Whether root mail file corruption cause cron job failures?
2. Do we have any size limitation for root mail file?... (0 Replies)
Discussion started by: paventhan
0 Replies
7. Solaris
Hi All
I work on solaris 8, 9 and 10 platforms and have encountered an error which is my wtmpx files appear to be corrupted as all entries contain the date 1970 (the birth of unix).
Now this is obviously not the case, so my query is:
1 - Can the existing wtmpx files be manipulated to... (6 Replies)
Discussion started by: drestarr96
6 Replies
8. Linux
hi,
yesterday I made something wrong and deleted daemon.log file. Then created a new file with the same name under the same path but now, it seems that file constructed has been corrupted .
In earlier times, it was including regex name. Now there is no regex name.
This is the current... (0 Replies)
Discussion started by: baris35
0 Replies
9. Red Hat
Hi,
Unexpectedly i entered wrong entries in .bash_profile for my user which has administrative permissions. So, i am getting errors for every command. I dont have backup file also, so any body can help me how to recover it.
Regards,
Mastan (7 Replies)
Discussion started by: mastansaheb
7 Replies
10. UNIX for Dummies Questions & Answers
Hi Folks,
While transferring file from FTP software like Filezilla the files gets corrupted.
Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies
LEARN ABOUT CENTOS
pmloglabel
PMLOGLABEL(1) General Commands Manual PMLOGLABEL(1)
NAME
pmloglabel - check and repair a performance metrics archive label
SYNOPSIS
pmloglabel [-Llsv] [-h hostname] [-p pid] [-V version] [-Z timezone] archive
DESCRIPTION
pmloglabel verifies, reports on, and can modify all details of the labels in each of the files of a Performance Co-Pilot (PCP) archive log.
The archive log has the base name archive and must have been previously created using pmlogger(1).
Each of the files in a PCP archive (metadata, temporal index, and one or more data volumes) must contain a valid label at the start, else
the PCP tools will refuse to open the archive at all.
Thus, the primary function of pmloglabel is to be able to repair any inconsistent or corrupt label fields, such that the entire archive is
not lost. It will not check the remainder of the archive, but it will give you a fighting chance to recover otherwise lost data.
Together, pmloglabel and pmlogextract are able to produce a valid PCP archive from many forms of corruption.
Note that if the temporal index is found to be corrupt, the "*.index" file can be safely moved aside and the archive will still be accessi-
ble, however retrievals may take longer without the index.
The options control the specific information to be reported, or the specific fields to be modified:
-h Modify the logged hostname in the archive label, for all files in the archive.
-l Dump out the archive label, showing the log format version, the time and date for the start and (current) end of the archive, and the
host from which the performance metrics values were collected.
-L Like -l, just a little more verbose, showing also the timezone and creator process identifier from the archive label.
-p Set the process identifier stored in the archive label to pid, for all files in the archive.
-s Rewrite the sentinel values which precede and follow the archive label, for all files in the archive.
-v Verbose mode. Additional progress information is produced at each step.
-V Stamp the version number into the magic number field at the start of the archive label, for all files in the archive.
-Z Changes the timezone in the archive labels to timezone in the format of the environment variable TZ as described in environ(5).
EXAMPLES
The following demonstrates the use of pmloglabel in finding and then correcting a corrupt field (PID) in the label of the temporal index of
an archive named "20080125".
$ pmdumplog -l 20080125
pmdumplog: Cannot open archive "20080125": Illegal label record at start of a PCP archive log file
$ pmloglabel 20080125
Mismatched PID (5264/5011) between temporal index and data volume 0
$ pmloglabel -p 5264 20080125
$ pmdumplog -l 20080125
Log Label (Log Format Version 2)
Performance metrics from host fw1
commencing Fri Jan 25 00:10:09.341 2008
ending Sat Jan 26 00:09:54.344 2008
EXIT STATUS
pmloglabel exits with status 0 if the archive labels are clean. If invoked incorrectly, the exit status will be 1. If corruption is
detected and still exists at the end, the exit status will be 2. If requested to write out the archive labels, and some aspect of that
write out fails, then the exit status will be 3.
FILES
$PCP_LOG_DIR/pmlogger/hostname
Default directory for PCP archives containing performance metric values collected from the host hostname.
PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the
file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura-
tion file, as described in pcp.conf(5).
SEE ALSO
PCPIntro(1), pmlogcheck(1), pmlogextract(1), pmlogger(1), pmlogger_check(1), pmlogger_daily(1), pmlogrewrite(1), pcp.conf(5), and
pcp.env(5).
Performance Co-Pilot PCP PMLOGLABEL(1)