5 ms·
My first guess was running package manager checksum verify, like "rpm -V kernel" , for rpm based distro. But i'm not sure if it was the question was aiming for.
by bizarref00l 13y ago
My first guess was running package manager checksum verify, like "rpm -V kernel" , for rpm based distro. But i'm not sure if it was the question was aiming for.
- gcr 13y agoThe question, as written, has no answer. fsck only checks the filesystem. There is no way to check the consistency of the running kernel but a kernel panic is a telltale sign of INconsistency :)
- forgeman 13y agoYou can check the consistency of the kernel "file" and compare a MD5 / SHA-1 of known good kernel. Assumption here that the kernel is loaded into healthy hardware. Depends on the spirit of the question. I do agree, running kernel looking at itself... chicken::egg.
- gcr 13y agoFor corruption, sure, but rootkits can mess that up by changing the md5 binary to always give the tainted kernel a known checksum. If a malicious attacker can modify a kernel, no process running within the kernel can check it for consistency.
- ytjohn 13y agoI was very confused on this question as well. Seeing both kernel and filesystem there together with the word consistent made me think of a sort of general health. So my answer would have been `iostat`. That would show me the running kernel, cpu utilization, and disk utilization.
- shabble 13y agoWhat happens if you try to fsck /proc or /sys? I presume 'not much' or 'you get an error', but I don't have an instance I'm prepared to sacrifice right now, just in case something hilariously destructive happens.
- judk 13y agoYou can run fsck in a diagnostic mode that doesn't write any changes.
- gcr 13y agofsck doesn't run on a directory, it runs on a block device. You can't run it on /proc or /sys because those aren't backed by a block device. /proc only looks like it has a file system because the kernel "pulls" the "files" out of thin air when you try to access them.