Solved Uptime values

Is FreeBSD uptime(1) value stored like Linux@ /proc/uptime? Where?

I don't understand what they mean in the man here:

FILES
/boot/kernel/kernel system name list

It doesn't seem to be a kernel variable:
kenv|grep uptime

Nor a shell variable:
env | grep uptime

No device nodes showing:
ls /dev
 
Is FreeBSD uptime(1) value stored like Linux@ /proc/uptime?
Things in Linux' /proc file system are not stored (same applies to /sys). They are simply a way to view kernel-internal data structures (meaning: values in memory) using a file system interface. The real copy of these values is somewhere in RAM, and administered by the kernel.

(Side remark: Whether using /proc and /sys to look inside the kernel, and sometimes even control it, is a bad or a good idea, is the topic of much debate.)

The uptime is maintained by the kernel, typically with the help of CPU-internal time registers. In traditional Unix, this was done by having an integer variable in the kernel that was incremented every HZ (typically every 1/10th of a second), and then reported. Today it is more complicated, but the important thing is: It's not a /dev, it's not a shell variable, it's not an environment variable, it's inside the kernel. To use it in user space, there are system calls, such as the various clock_... calls.
 
Back
Top