/proc

Do we need settings for "proc" in /etc/fstab still, please?
Long time ago I removed /dev/fd "fd" from /etc/fstab which was mention in openjdk install.

Thank you.
 
Last edited:
I believe that some ports want it I don't recall specifically "which ones" and I don't know if it's strictly needed.
All the ports that want it I think say so in the pkg install message, so a way would be have git tree for the ports and grep -ir. There may be easier ways, but I'm not sure.

On 15.0-RELEASE man procfs says "This functionality is deprecated. Users are advised to use libprocstat(3) and kvm(3) instead" so maybe ports are patched to do just that.
 
I have these in /etc/fstab:
Code:
tmpfs                   /tmp            tmpfs   rw,mode=1777    0       0
linprocfs         /compat/linux/proc    linprocfs rw,noauto     0       0
linsysfs          /compat/linux/sys     linsysfs rw,noauto      0       0
proc                    /proc           procfs  rw              0       0
fdescfs                 /dev/fd         fdescfs rw              0       0
tmpfs           /compat/linux/dev/shm   tmpfs   rw,mode=1777    0       0
 
Nothing specific, but:
Do we need settings for "proc" in /etc/fstab still, please?
Not sure if it's needed, but I did proc in fstab for Xfce on 16.0 two days ago no problem (iirc proc was mentioned in Handbook for Xfce)
Long time ago I removed /dev/fd which was mention in openjdk install.
I added that too (iirc OpenJDK mentioned to do it somewhere); both cases I didn't really check if the filesystem was used or if there were any problems without adding proc or fd, but iirc OpenJDK was fine without fd (I used Java apps and LibreOffice a little 14.1 or .2 before finding the fd mention on accident :p)
 
FYI:
Should be insufficient (not checking messages in ports Makefiles nor cases that terms "proc" and "mount" doesn't appear in the same line) / still include noises, but command below
find /usr/ports/ -name pkg-message\* \( -not -path '*/distfiles/*' \) \( -not -path '*/distfiles/bazel_dist/*/*' \) \( -not -path '*/packages/*' \) \( -not -path '*/.git/*' \) -exec grep -H "proc" {} ';' | grep mount | cut -d : -f 1 | cut -d '/' -f 4,5 | sort | uniq
on main (aka latest) branch of ports tree at commit c47c519e55469c04ca3b435ffaee1300f2c36d17 resulted like below.
Code:
deskutils/anydesk
deskutils/parcellite
devel/libsigsegv
devel/linux-ltp
devel/oclgrind
devel/RStudio
graphics/grafx2
java/bootstrap-openjdk8
java/linux-oracle-jdk18
java/linux-oracle-jre18
java/linux-oracle-serverjre10
java/openjdk11
java/openjdk17
java/openjdk20
java/openjdk21
java/openjdk22
java/openjdk23
java/openjdk24
java/openjdk25
java/openjdk8
lang/mono5.10
lang/mono5.20
lang/mono6.8
math/geogebra
net/nethogs
security/beid
security/py-vpn-slice
sysutils/gkrelltop
sysutils/logstash7
sysutils/logstash8
sysutils/logstash91
sysutils/logstash92
sysutils/lxtask
sysutils/memfetch
x11/keyboardcast
 
$ cat /etc/fstab
Code:
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/gpt/efiboot0        /boot/efi    msdosfs    rw        2    2
/dev/ada0p3        none    swap    sw        0    0
/dev/ada1p3        none    swap    sw        0    0
I have nothing.
Why delete the file descriptor when uninstalling OpenJDK?
$ cd /dev/fd/
Code:
/dev/fd/0  /dev/fd/1  /dev/fd/2
 
Code:
Did a quick scan through the OpenJDK sources, and found the following:

The most important use of /dev/fd is to be able to close any extra file descriptors
that for some reason don't have the O_CLOEXEC flag set when a new process
is forked.

/proc seems to be a bit more involved, and is used by the JVM for some memory
management, and determining system characteristics of certain architectures.
(PowerPC, s390, at least.) Not sure what impact it has to remove it, but the effects
may not immediately be obvious.
Code:
Examples of not being needed:
- Tomcat/jboss/whatnot (though webapps may or may not require it)
- Most standalone Java applications I've tested

Examples of it being needed (seems to frequently have to do with observing the local system):
- Graylog (otherwise it cannot see if its own inputs are running or not)
- Elasticsearch, Opensearch (varies a bit between versions)
- Logstash (com.sun.management.internal.OperatingSystemImpl.getCommittedVirtualMemorySize0)
 
Hello,
Code:
proc                 /proc   procfs  rw
Proc - it is only needed for certain ports.
A clean system does not need Proc.
Besides, if I'm not mistaken, Proc is only a Linux function.
 
?

I meant that. Why remove anything from the
/dev
directory at all?
Perhaps a stretch, but /dev/fd is a special filesystem, "fdescfs" so maybe in some world there is a potential security hole?

Noone is actually "removing" anything from /dev, it's simply removing the entry from /etc/fstab (which I don't think is added by default).

/dev has been dynamic for a long time, things added and removed as the kernel finds them.
 
Back
Top