I typed in sysctl -A | grep na
result:
[snip..]
error: "Success" reading key "dev.parport.parport0.autoprobe"
[snip...]
error: permission denied on key 'net.ipv4.route.flush'
[snip...]
what about these errors?
I typed in sysctl -A | grep na
result:
[snip..]
error: "Success" reading key "dev.parport.parport0.autoprobe"
[snip...]
error: permission denied on key 'net.ipv4.route.flush'
[snip...]
what about these errors?
You have not given us enough information to be able to help you.
For starters, what OS and version are we discussing?
it's an Debian based Ubuntu 10.10 server installation.
I don't understand why there is an 'permission denied' error as I typed this command as root user ('sudo -s' before).
sysctl doesn't have a giant list of everything it's allowed to change in the kernel. All it does is trawl the entire /proc/sys folder looking for things to print.
That item in particular:
$ ls -l /proc/sys/net/ipv4/route/flush
--w------- 1 root root 0 Feb 23 15:19 /proc/sys/net/ipv4/route/flush
$
...is a write-only option. Not even root can read from it, because the kernel holds no value for it. It's just a special file that you can write to to trigger a route-cache flush.
So when told to "print everything under /proc/sys" it attempts to read it, fails to do so, and warns you. Nothing's wrong.
Seems to be one of those bugs that Ubuntu just somehow never got around to fixing:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/236558
Haven't seen this happen on any other OS except an Ubuntu-based one.
Even ubuntu's own bug report doesn't agree with your opinion:
dino99,
I think it does not a kernel bug or an issue. It just doesn't have the read
permission for "sysctl" to read the data from it.
As you can see in the "/proc/sys" directory, not all the files are readable,
some of them are only have write permission. That means you can't read
any data from it and inside kernel source, it doesn't implement the read
function for the file.
% ls -l /proc/sys/kernel/cad_pid /proc/sys/fs/binfmt_misc/register /proc/sys/net/ipv4/route/flush /proc/sys/net/ipv6/route/flush
--w------- 1 root root 0 2010-06-22 09:35 /proc/sys/fs/binfmt_misc/register
-rw------- 1 root root 0 2010-06-25 14:11 /proc/sys/kernel/cad_pid
--w------- 1 root root 0 2010-06-25 14:12 /proc/sys/net/ipv4/route/flush
--w------- 1 root root 0 2010-06-25 14:12 /proc/sys/net/ipv6/route/flush
So, I'm going to close this bug if you can accept my explanation.
It's kernel-specific, not distro-specific.
Thanks. Which process is looking for this kind of trigger (how often)?
What about the first error message?
error: "Success" reading key "dev.parport.parport0.autoprobe"
this file is set to 444 - there are many more files like this don't producing this error when starting kernel option listing..
I don't imagine there is one. But if you did want to flush routes, it'd be handy to have, wouldn't it?
I'm not going to track down the meaning of each and every separate, individual thing in /proc/ for you. Bottom line is these things talk to device drivers, their meanings vary. It doesn't make sense to try and read from them in all situations.
No problem, I will browse the net for the kernel options someday.. ![]()
They might be different by then 