Having used lsof
, as suggested in Too many open files - how to find the culprit , I've found that thousands of files are open due to operating-system style programs such as unity-2d-
, gnome-do
, and nautilus
. Only one of the top 50 is an application-style program (firefox).
lsof | perl -lane '$x{"$F[0]:$F[1]"}++;
END { print "$x{$_}\t$_" for sort {$x{$a}<=>$x{$b}} keys %x}' | tail -50
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /var/lib/lightdm/.gvfs
Output information may be incomplete.
216 unity-2d-:26285
216 unity-2d-:31600
216 unity-2d-:2577
239 nautilus:30626
239 nautilus:3777
239 nautilus:31250
239 nautilus:30781
239 nautilus:15101
241 nautilus:26123
241 nautilus:20495
241 nautilus:9627
241 nautilus:31612
241 nautilus:26298
243 nautilus:7672
243 nautilus:603
243 nautilus:21594
243 nautilus:2590
243 nautilus:17574
243 firefox:9768
243 nautilus:12422
247 nautilus:14265
256 gnome-do:31632
256 gnome-do:20519
256 gnome-do:26318
256 gnome-do:9647
256 gnome-do:26143
257 gnome-do:12437
257 gnome-do:14284
257 gnome-do:21612
257 gnome-do:622
257 gnome-do:7686
257 gnome-do:2608
257 gnome-do:17603
270 unity-2d-:3756
270 unity-2d-:30612
272 unity-2d-:15087
277 unity-2d-:12408
277 unity-2d-:21580
278 unity-2d-:2576
278 unity-2d-:14251
278 unity-2d-:587
279 unity-2d-:9613
279 unity-2d-:30768
279 unity-2d-:20481
280 unity-2d-:26109
281 unity-2d-:26284
283 unity-2d-:31599
284 unity-2d-:31235
288 unity-2d-:7658
290 unity-2d-:17559
Is this normal, or is something wrong?
lsof | cut -f 1 -d ' ' | sort | uniq -c | sort -rn | head