umount'ing /proc

Lou Kamenov lou.kamenov at aeye.net
Fri Jun 28 21:10:51 BST 2002


On Sun, 29 Sep 2002 16:52:02 +0100
"William Cooper" <williamcooper at data-storm.net> wrote:

> Hi everyone, hope everyone is well and enjoying themselves,
> 
> Was just wondering, would umount'ing /proc and keeping it unmounted
> cause any problems with any programs in FreeBSD?
> 
> A friend of mine was pretty convinced it would break programs checking
> processes, but FreeBSD has proven them wrong! Would anyone be able to
> explain what the hell is going on? :)

there is supposed to be a patch for this thing.
(http://marc.theaimsgroup.com/?l=freebsd-bugs&m=103044122111211&w=2)


> 
> The main aim of this is to stop users finding a list of processes,
> kern.ps_showallprocs=0 in /etc/sysctl.conf does a great job for users
> who aren_t so committed to finding a list of processes, but someone on
> another FreeBSD list had found a perl script which simply outputted
> /proc into a nicely fitted table.

its not that hard just do a loop with a big number > 10000 i ps -p %number.

sort of
---
[root at aragorn ~ttyp0 ]# sysctl kern.ps_showallprocs=0
kern.ps_showallprocs: 1 -> 0
[ /home/lou/av ]
----
[lou at aragorn ~ttyp4 ]$ mount
/dev/ad0s4a on / (ufs, local, soft-updates)
/dev/ad0s4h on /myapps (ufs, local, soft-updates)
/dev/ad0s4f on /tmp (ufs, local, noexec, soft-updates)
/dev/ad0s4g on /usr (ufs, local, soft-updates)
/dev/ad0s4e on /var (ufs, local, soft-updates)
/dev/acd0a on /cdrom (cd9660, local, read-only)
[ /home/lou ]
--
# no proc right?
[lou at aragorn ~ttyp4 ]$ ps -p1
  PID  TT  STAT      TIME COMMAND
    1  ??  ILs    0:00.03 /sbin/init --
[ /home/lou ]
[lou at aragorn ~ttyp4 ]$ for i in 1 2; do ps -auxww -p $i; done
USER   PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root     1  0.0  0.1   552  316  ??  ILs   5:07PM   0:00.03 /sbin/init --
USER   PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root     2  0.0  0.0     0    0  ??  DL    5:07PM   0:00.01 (pagedaemon)
[ /home/lou ]
----

anyways you got the drift.

cheers,
-lk

> 
> Thanks for your time.
> 
> Regards
> 
> William Cooper
> 
> 
> 
> ------ FreeBSD UK Users' Group  -  Mailing List ------
> http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users
> 


-- 

Lou Kamenov	lou at freebsd-bg.org		lou.kamenov at aeye.net
FreeBSD BGUG	http://www.freebsd-bg.org	http://www.aeye.net
GPG Key ID - 	0xA297084A
Key Fingerprint - 936F F64A AD50 2D27 07E7  6629 F493 95AE A297 084A
It`s a free ride when you`ve already paid.





More information about the Ukfreebsd mailing list