Its zero-length files are neither binary nor text,
yet you can examine and display them
Under Linux, everything is managed as a file;
even devices are accessed as files (in the /dev directory).
Although you might think that “normal” files are either text or binary (or possibly device or pipe files),
the /proc directory contains a stranger type:
virtual files.
These files are listed, but don’t actually exist on disk;
Although almost all the files are read-only,
a few writable ones (notably in /proc/sys)
allow you to change kernel parameters.
(Of course, you must be careful if you do this.)
The numbered directories correspond to each running process;
a special self symlink points to the current process.
Some virtual files provide hardware information, such as
/proc/cpuinfo,
/proc/meminfo,
/proc/interrupts.
Others give file-related info, such as
/proc/filesystems
/proc/partitions.
The files under /proc/sys are related to kernel configuration parameters
/proc/cmdline:
Shows the parameters that were passed to the kernel at boot time.
/proc/dma:
Shows the Direct Memory Access channels in use.
the numerical named directories
represent all running processes.
When a process ends,
its /proc directory disappears automatically
cmdline:
Contains the command that started the process, with all its parameters.
cwd:
A symlink to the current working directory (CWD)for the process;
exe links to the process executable,
and root links to its root directory.
environ:
Shows all environment variables for the process.
fd:
Contains all file descriptors for a process,
showing which files or devices it is using.
maps, statm, and mem:
Deal with the memory in use by the process.
stat and status:
Provide information about the status of the process,
but the latter is far clearer than the former.
if you want to program a better-looking top,
all the needed information is right at your fingertips.
AIGC技术到底是什么?为什么这么火热? ALCG技术到底是什么?AIGC技术的发展史AIGC技术特点AIGC技术主要用途ALGC技术未来发展 ALCG技术到底是什么?
AIGC(Artificial Intelligence in Game Creation)技术是指…
1.SDL Game Development 是什么意思?
SDL(Simple DirectMedia Layer)是一个跨平台的多媒体库,用于开发图形、音频和输入处理等功能的应用程序。SDL 提供了一组简单而强大的API,使开发者能够轻松地创建游戏和其他多媒体…