procfs (or the proc filesystem) is a special filesystem in UNIX-like operating systems that presents information about processes and other system information in a hierarchical file-like structure

learn more… | top users | synonyms

0
votes
0answers
9 views

Linux ps -elf command output, what is Process Flag meaning?

In output of ps -elf command in linux, we can recognize that process flag of 4 and 1, and process flag of 5, (sum of 1 and 4), but what is meaning of process flag 0 ? unfortunately, man does not help ...
1
vote
2answers
28 views

Directory in /proc that isn't process dir but start with number?

Quick question. Is it possible to create directory in /proc that starts with number but isn't process directory (where name is PID)? I write software that searches for process directories and I wonder ...
5
votes
1answer
177 views

Is /proc strictly reserved for kernel/driver space?

When developing a userspace application or daemon, it is good design practice to provide some form of component status. I have often thought of using /proc for this purpose - is this an acceptable ...
1
vote
2answers
35 views

Wrong eUID in `/proc/PID/status` when SETUID is used

While doing a wargame challenge, I ran into an issue with permissions. The info given by /proc/PID/status is not in adequation with the permissions that should be given to the processus. I am user ...
1
vote
0answers
13 views

What do the fields in /proc/net/ipt_hashlimit/FILE mean?

What do the fields in /proc/net/ipt_hashlimit/FILE mean? These files are created upon iptables -A CHAIN -m hashlimit--hashlimit-name FILE [...] [...] 9 198.51.100.23:0->0.0.0.0:0 80000 80000 160 ...
6
votes
3answers
67 views

Peek at the contents of stdin

I'm trying to debug a Linux application that can receive commands via stdin, and it would be really useful to be able to see everything that gets written to stdin. My first approach was to execute ...
0
votes
1answer
24 views

lsof vs cat/proc/…/maps [closed]

While looking for a detection method for services that would need to be rstarted after patching OpenSSL, I stumbled over a difference between the return of those 2 commands : [root@host ~]# cat ...
2
votes
0answers
21 views

Significance of Linux kernel's default_console_loglevel

What is the significance of default_console_loglevel in Linux? Commonly I see it described as the default value of console_loglevel. However, what that means I haven't seen explained anywhere. ...
0
votes
0answers
24 views

How to change the console_loglevel in linux?

I read at multiple places (e.g. here http://elinux.org/Debugging_by_printing), that you can change the console log level by echoing an integer to /proc/sys/kernel/printk. If that worked shouldn't the ...
1
vote
0answers
18 views

Inconsistent output on /proc. Can some processes be hidden? [duplicate]

When I list /proc/<PID>, works as expected. But when I use ps or ls /proc | grep <PID>, the process is hidden. How & Why is this possible? [user@host ~]$ ls /proc/12263 attr ...
1
vote
0answers
21 views

What is kswapd_low_wmark_hit_quickly from /proc/vmstat

What does this parameter mean? # cat /proc/vmstat | grep low kswapd_low_wmark_hit_quickly 2
0
votes
0answers
61 views

How to determine the memory usage of a single process?

There a few helpful scripts out there, which give some useful information. But I would like to calculate those values myself. I am interested in values like USS and PSS. I already had my first attempt ...
0
votes
0answers
55 views

Why cancelled_write_bytes is different size than created/removed file?

I was wondering how field cancelled_write_bytes from /proc/[pid]/io works, so I've created a file (dd) and then deleted it (rm). I was expecting to see cancelled_write_bytes ~equal to file size while ...
2
votes
1answer
72 views

Why is one file listed sereval times in /proc/pid/smaps?

When I cat /proc/1/smaps file I found that libs have often up to 4 mappings with different sizes and different Rss/Pss etc: 7f1a09696000-7f1a0982f000 r-xp 00000000 fe:04 1313975 ...
2
votes
2answers
54 views

Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches?

I am trying to clear my filesystem cache from inside a docker container, like so: docker run --rm ubuntu:vivid sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches" If I run this command I get sh: 1: ...
9
votes
1answer
358 views

Know which process does I/O without iotop

On Linux, I want to know which process uses my disk I/O bandwith. I know I can use iotop but I have a machine where, for various reasons, iotop cannot be installed. How can I manually get that ...
1
vote
0answers
52 views

How to know file name of sockets or pipes in /proc/[pid]/fd

In Android, #ls -l 15843/fd gives following output, lrwx------ u0_a179 u0_a179 2015-05-28 11:58 90 -> socket:[193728] lrwx------ u0_a179 u0_a179 2015-05-28 11:58 91 -> ...
1
vote
1answer
48 views

Is there any way to read files from the virtual /proc directory using smbclient?

Is there any way to read files from the virtual /proc directory using smbclient? No root access. Both server and client are Debian Linux machines. Server is running Samba 3. Smbclient version is ...
0
votes
1answer
58 views

passing bootloader arguments to the kernel

We know that the bootloader parameters are passed to the kernel before the init process starts executing. What file in the /proc directory actually does this job?
0
votes
0answers
71 views

/proc/diskstats and iostat are right? strange values on my test

My question is quite simple.. I am doing some tests to confirm the perfect work of both (diskstats and iostat) disk meters and something is wrong here. I write this command on cmd and I get the ...
4
votes
5answers
276 views

directory structure vs file system

What is the difference between directory structure and file system? Unix/Linux directories and file system looks as follows: The following two directories obviously we know directories. ...
16
votes
3answers
2k views

Why is proc called a file system?

The proc file system allows the kernel to communicate information about each running process on a Linux system. Why is proc called a file system? It’s not a real file system like ext4. It’s just a ...
1
vote
1answer
54 views

What are possible reasons why iwconfig is not updating connection stats?

I use iwconfig to show me some information about my current internet connection like this $ iwconfig wlp2s0 IEEE 802.11abg ESSID:"eduroam" Mode:Managed Frequency:2.462 GHz Access ...
2
votes
2answers
24 views

Utility which gives line from /proc/id/maps by specific address

Is there an utility that gives me specific line from /proc/id/maps when given specific address from this process? For example when given 0x7fb4a84f6008 it returns: 7fb4a84f6000-7fb4a84fd000 r-xp ...
3
votes
1answer
45 views

Does /proc/[pid]/status always use kB?

Particularly, does proc always list the VmRSS value in kB? I can't find a solid answer on the documentation, although it appears that it sticks to one unit.
3
votes
1answer
171 views

Which file in /proc gets read by the kernel during the boot up process?

Which file in /proc gets read by the kernel during the boot up process? This was a question on my LPIC 101 test that I think I might have answered wrong. I searched on google and some other places but ...
1
vote
0answers
60 views

How can I get read/write instant speed of a Hard Drive using /proc/diskstats data?

I know that the proc/diskstats file presents these data columns: 1 - major number 2 - minor mumber 3 - device name 4 - reads completed successfully 5 - reads merged 6 - sectors read 7 - time spent ...
0
votes
1answer
73 views

How does the proc/diskstats work to present that values? And for proc/stat and meminfo?

I am trying to get the diskstats data by same way that the file does. Is there any way to reach that values without reading that file? How the values are placed there? Is there any ".c" file that ...
7
votes
2answers
192 views

How does the /proc/<pid>/exe symlink differ from ordinary symlinks?

If I start a process and then delete the binary of it, I can still recover it from /proc/<pid>/exe: $ cp `which sleep` . $ ./sleep 10m & [1] 13728 $ rm sleep $ readlink /proc/13728/exe ...
0
votes
1answer
131 views

How can I edit /proc/net/tcp?

I need to edit 1 line in /proc/net/tcp while the file is also used by the linux kernel for updating other lines of it by the kernel. Background: Each line in /proc/net/tcp represents a TCP socket. ...
4
votes
2answers
76 views

htop shows only the processes of the user that's running it?

On my old Debian Wheezy I see as a normal user without sudo all processes from all user in htop. On my new Debian Wheezy I only see my own processes. Old system kernel: 3.2.0-4 New system kernel: ...
0
votes
0answers
40 views

Passing argument in tcl proc

I have a tcl proc as follow: proc foo {a {b 300} {check FALSE} {c 100}} { //doing something here } Can I pass the value to c argument while still using default values for b and check arguments ...
0
votes
1answer
72 views

Finding vmstat's swap (si/so) data anywhere in /proc

Is it possible to find (or derive) the amount of data swapped in our out per second from information contained in the /proc filesystem? I'd like to get something like what vmstat provides in its ...
2
votes
1answer
336 views

CPU speed and cat /proc/cpuinfo

I use centos 6.4 64. I have old proc - CPU AMD Phenom II X4 810 (HDX810W) 2.6 GHz. However, when I execute the command cat /proc/cpuinfo I get the following: processor : 0 vendor_id : ...
1
vote
2answers
54 views

List running processes without procfs

I'd like to list running process (like using ps or top), but there is no procfs mounted. The procfs not being mounted is intentional, and is made to prevent malicious user to access systems ...
0
votes
1answer
72 views

How to read files in the proc directory? [closed]

I found that ls command can't read file in `/proc' Please see the attachment. There are many link files ,but you can't read it by ls.
0
votes
1answer
27 views

Which lines do change after a sync in /proc/meminfo ? [duplicate]

I was taught, that the sync command writes the data stored within the cache of the RAM onto hard-disk, this release should be displayed in /proc/meminfo. However when I cat /proc/meminfo before and ...
1
vote
1answer
203 views

lsof: measure I/O rate of a socket fd

I'm writing a script that parses the output of lsof to show a list of what processes have sockets open (similar to what netstat shows). lsof also gives me a file descriptor. What I want to do now is ...
3
votes
0answers
183 views

What is the meaning of the contents of /proc/net/unix?

On my Android device there is the file called /proc/net/unix who's content does not conform to that of any standard linux distribution (which show the unix domain sockets.) First few lines: Num ...
1
vote
1answer
61 views

How to see kernel time variables without using adjtimex?

The man page for adjtimex says Anyone may print out the time variables, but only the superuser may change them. How do I see the value shown by adjtimex -p as the tick variable without using ...
5
votes
2answers
277 views

ls -l /proc/self | increamental PID?

Each time, when the commandls -l /proc/self is executed, the link points to process who's PID keeps increasing. Why is this so ? Is it the PID of the ls command ?
1
vote
0answers
64 views

/proc/stat - is guest counted into user time?

I have a quick question. In man page for /proc/stat this is not clear to me: Is guest and guest_nice time included in user time in /proc/stat? http://man7.org/linux/man-pages/man5/proc.5.html in ...
1
vote
1answer
118 views

How is /proc/net files getting populated in Linux/Unix?

I'm working on a network monitor for Linux, without packet sniffing. I'm planning to read the network statistics and related data from /proc/net files. I know that /proc is the mount point of process ...
1
vote
0answers
153 views

Monitor the creation of new processes

I want to get a notification whenever a new process is created. I've tried to use inotify on /proc, but it didn't report any event even though a new directory appeared in /proc. I could list the ...
-1
votes
1answer
31 views

what directory is used to execute “expr” command,what holds it process-id and log record [closed]

What directory execute the expr command. What directory holds the the PID of the command. What directory hold the log file of this command.and how to read all these??
2
votes
1answer
299 views

how to read any process' /proc/pid/io

I'm trying to monitor disk activity of each process. One way that I found how to do this is to read /proc/pid/io file and compare fields with previous read. That works fine except my monitoring ...
2
votes
0answers
33 views

What are the /proc/drivers directories organisation for nouveau or radeon

The context: I need to get some basic informations from the graphic card in a lib in lua. The idea is to not rely on external software (like hwinfo for example). I know that for a system with an ...
0
votes
0answers
303 views

Mount proc filesystem in a docker container

i want to install gitlab vcs in a docker container with ubuntu base image on it. But when i run gitlab-ctl recofigure, it can't write to a file on proc fs. How to mount or run docker to provide rw ...
2
votes
1answer
185 views

Programmatically get CPUs 'detailed' usage, like top/htop

htop has a great way to show CPU usage. It shows the activity (usage in %) of each cores, and each core gauge is divided into three parts : blue: low priority processes green: normal processes red: ...
2
votes
2answers
190 views

How to print total number of file descriptors with index 24

How can I print the total number of file descriptors with index 24 for all the running processes on Linux? I tried $ ls /proc/*/fd 2> errors.txt > stdout.txt | grep "^24" stdout.txt | wc -l ...