PDA

View Full Version : inode makes problem i think


goody_goody
May 28th, 2009, 05:27
Dear members,

Squid 3.0 stable 14 running on a freebsd FreeBSD 7 machine, crashes after running for hours not days. I checked the squid logs and found followings in it.


> 2008/04/14 22:48:11| comm_old_accept: FD 14: (53) Software caused
> connection abort
> 2008/04/14 22:48:11| httpAccept: FD 14: accept failure: (53) Software
> caused connection abort

after googling error on net, I found that problem is because of file descriptors, but I can't know how to solve this problem. I have set maxfiles=32768 in /boot/loader.conf.

please help me.

following is the snap of df -i command on my freebsd7 machine running squid.

Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on
/dev/da0s1a 10154158 246912 9094914 3% 2765 1316145 0% /
devfs 1 1 0 100% 0 0 100% /dev
/dev/da0s1f 76168552 1597624 68477444 2% 94429 9750305 1% /cache1
/dev/da0s1g 76168552 4 70075064 0% 2 9844732 0% /cache2
/dev/da0s1e 40622796 2540572 34832402 7% 312023 4940071 6% /usr
/dev/da0s1d 60931274 324200 55732574 1% 359 7889559 0% /var


1. can somebody tell me why my %iused is not so much difference than Capacity.

2. Does this output shows anything wrong?

3. How can i monitor the file descriptors usage and availability.

4. pls also suggest me some light weight still good FreeBsd monitoring tool.

Should you people need more info pls let me know.

Thanks & Regards,
.Goody.

BuSerD
May 28th, 2009, 15:13
Goody,

1. There is no indication of a problem with inodes. The difference between Capacity and %iused can be contributed to the fact inodes are used to keep track of the data placed on a partition and does not coincide with the file size of that data but rather the newfs params passed when originally when formatting the drive.

2. In short that 0% you see is only because 2765 is less than 0.00 percent of 1316145. If you want to know more about that

man 5 fs


3. I don't know of a package to monitor the file descriptors but you don't need to do that based on what you have posted because that is not the problem.

4. What all would you like to monitor and be specific

DutchDaemon
May 28th, 2009, 15:52
The FD error in Squid has nothing to do with a perceived lack of file descriptors. It's a harmless error that means that the target website 'went away' (timed out, disconnected, reset the connection). As such it is 'an error happening on a file descriptor', not a file descriptor error, if you catch my drift.

FD 14 is simply where Squid is/was running on. Some local installations here:

squid squid 20478 14 tcp4 127.0.0.1:3128

It can be another one:

squid squid 28961 13 tcp4 127.0.0.1:3128

fronclynne
May 28th, 2009, 20:58
after googling error on net, i found that problem is because of file descriptors, but i can't know how to solve this problem. I have set maxfiles=32768 in /boot/loader.conf.

please help me.

following is the snap of df -i command on my freebsd7 machine running squid.

Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on
/dev/da0s1a 10154158 246912 9094914 3% 2765 1316145 0% /
devfs 1 1 0 100% 0 0 100% /dev
/dev/da0s1f 76168552 1597624 68477444 2% 94429 9750305 1% /cache1
/dev/da0s1g 76168552 4 70075064 0% 2 9844732 0% /cache2
/dev/da0s1e 40622796 2540572 34832402 7% 312023 4940071 6% /usr
/dev/da0s1d 60931274 324200 55732574 1% 359 7889559 0% /var


1. can somebody tell me why my %iused is not so much difference than Capacity.

2. Does this output shows anything wrong?

3. How can i monitor the file descriptors usage and availability.

4. pls also suggest me some light weight still good FreeBsd monitoring tool.

(Disclaimer: I like to ride bikes and cook, so I might not be the best source for computer-tube stuff.)

I don't think that file descriptors are inodes.
fd, fdescfs, fs, and even the risible wikipedoof (http://en.wikipedia.org/wiki/File_descriptor)(wikiplof (http://en.wikipedia.org/wiki/Inode)) seem to say things. But I'm fairly sure you don't have a problem with inose exhaustion.

To answer some of your questions:
1) You have about the right number of inodes. This is a good thing.
2) No, but that's not where your error is, anyway. DutchDaemon explains it very well. As usual.
3) I've done a little bit of poking and I'm more confused now that when I started. I need to read more.
4) Besides all the crazy built-in stuff, like vmstat, netstat, iostat, systat (why not sysstat? elephino. too sybilant, mebbeh?) . . . well, this: http://www.freebsd.org/cgi/ports.cgi?query=system+monitor&stype=all&sektion=all(NB Not vetted closely).

Man, a dude (assuming that's what I am) can read for months on the properties and uses of file descriptors. It's like the whole, "What is Object Oriented (Orientated, if you're from the Tenderloin) programming?"
"It's where you treat everything as an Object!"
"So, what is an object?"
"It's what you treat everything as!"
"Wait, how do you do that?"
"You start by treating everything as an Object, then all you do is treat everything as an Object. In the end, everything is an Object."