LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   invalid integer value on a directory (https://www.linuxquestions.org/questions/linux-newbie-8/invalid-integer-value-on-a-directory-721379/)

j-me 04-24-2009 06:25 AM

invalid integer value on a directory
 
The /proc directory has a 'high value'. not sure what it is nor how to change it. When I use WinSCP, I receive an error '4294967205' is not a valid integer value. Here is what a ls -l shows.

drwxr-xr-x 15 root root 4096 2009-04-23 12:02 opt
dr-xr-xr-x 4294967205 root root 0 2009-03-05 12:58 proc

What does this value represent and how does one change it?

Thank you!

norobro 04-24-2009 10:35 AM

I don't know why that number is so large but here is what it represents:
Quote:

The output of the ls -l command is interpreted as:

1. First group of 10 characters gives type of file and permissions. . . . .

2. Next is an integer indicating how many links (names) this file has. Most plain files have only one link. Directories have at least two links: their name as stored in the parent directory, and the symbolic name . (dot) that they store meaning myself. Directories have additional links if they contain subdirectories, as each subdirectory has a link back to the parent stored under the symbolic name .. (dot dot).
As an example here is the listing of my proc directory:
Code:

\ls -ld proc/
dr-xr-xr-x 109 root root 0 2009-04-24 02:54 proc/

Maybe drilling down further will give you a clue as to what is going on. In your proc directory try:
Code:

\ls -l | sort -rn --key=2 | head -n5
That should list the subdirectories (or files) under proc that have the highest number of links. Here's the output on my machine:
Code:

\ls -l | sort -rn --key=2 | head -n5

dr-xr-xr-x 111 root        root                0 2009-04-24 02:54 .
drwxr-xr-x  26 root        root            4096 2009-04-24 07:55 ..
dr-xr-xr-x  18 root        root                0 2009-04-24 10:29 irq
dr-xr-xr-x  8 root        root                0 2009-04-24 07:55 acpi
dr-xr-xr-x  6 statd      root                0 2009-04-24 09:17 3251

HTH
Norm

j-me 04-24-2009 12:05 PM

invalid integer value on a directory
 
Here is the result:

>ls -l | sort -rn --key=2 | head -n5
/bin/ls: 0: No such file or directory
total 17563666
dr-xr-xr-x 26 root root 0 2009-04-24 12:00 irq
dr-xr-xr-x 11 root root 0 2009-04-24 12:00 sys
dr-xr-xr-x 10 root root 0 2009-03-05 12:58 acpi
dr-xr-xr-x 6 root root 0 2009-03-05 12:58 net

Not sure what the 0: No such file or directory is all about. That may be the clue?

PTrenholme 04-24-2009 01:38 PM

The total number of processes (17,563,666) listed in /proc seems to suggest that you've been running your system for a fairly long time without rebooting. If that's not correct, check for some process (presumably required by the kernel) that's failing and being restarted. (I.e., a process creation loop.)

If that presumption is correct, schedule a reboot so the process count can restart from 0, and reboot periodically. Or, just live with the error message. (I think the the /proc file system is a "virtual" system (metaphorically speaking), not using much actual disk space, but, hey, I'm somewhat vague on real Linux internals.)

j-me 04-27-2009 11:13 AM

invalid integer value on a directory - followup
 
I just wanted to thank norobro and PTrenholme for the responses.

I could not find any logical reason for the value so I tried the reboot option. This 'fixed' the issue.

Thank you! ;)

chrism01 04-27-2009 07:13 PM

/proc is basically a window into the kernel, its not a real filesystem or dir.
As a result, it may have strange attributes. Best to leave it well alone unless you really know what you're doing.


All times are GMT -5. The time now is 07:50 PM.