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

1
vote
1answer
51 views

Read “/proc” to know if a process has opened a port

I need to know if a process with a given PID as opened a port without using external commands. I must then use the /proc filesystem. I can read the /proc/$PID/net/tcp file for example and get ...
1
vote
0answers
26 views

What does the “ss -s” result “Total:” value represent? How to get details on each of them?

I am trying to understand what the ss -s result line Total: value represents, along with how this number is related to the other numbers. Note, the following values are equivalent: ss -s Total: == ...
2
votes
0answers
36 views

Disk i/o latency using /proc/vmstat file

How do i calculate Disk read and write latency in Linux? Is it possible to do the calculation using /proc file system? I am used iostat and vmstat command. But i do not understand how the ...
4
votes
1answer
49 views

What is /proc/<pid>/net/dev?

I'm interested in per-process network I/O counters, like those in /proc/net/dev and found what I thought was it under /proc/<pid>, i.e. /proc/<pid>/net/dev. But it seems that was too easy ...
0
votes
1answer
40 views

Linux Performance Measurements using /proc/vmstat

Am new to Linux, Please any one help. I want to calculate Input output performance using /proc/vmstat file? when i run command cat /proc/vmstat | grep pgpg The answer is pgpgin 726854 pgpgout ...
1
vote
1answer
26 views

Memory usage of a given process (using Linux proc filesystem)

I want to know which files from /proc directory and which fields of these files I need to calculate the memory usage of a given pid. I've been using the "stat" file and the "vsize" parameter that is ...
-1
votes
4answers
72 views

How to get hard disk information from /proc and/or /sys

How can I get hard disk capacity, usage, etc. using the /proc or /sys filesystems? What file(s) do I need to process to get that information? Does any one know, how to find Hard disk size, usage, etc ...
2
votes
1answer
45 views

How run free command by crontab

I want to run this command: free && sync && echo 3 > /proc/sys/vm/drop_caches && free -m by cron that why I'm able to free my RAM and cache in ubuntu system. I'm using ...
0
votes
1answer
112 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
182 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
52 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
31 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
75 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
33 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
25 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
36 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
24 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
64 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
67 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
88 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
90 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
465 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
71 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
63 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
66 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
99 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
416 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
60 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
25 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
55 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
181 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
74 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
103 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
285 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
162 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
93 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
48 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
86 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
370 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
63 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
97 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
33 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
0answers
34 views

Constant 60KB Shared library memory on /proc/<pid>/maps [duplicate]

In a quest for understanding RAM requirements of system processes, I arrived to analysis of /proc/pid/maps. I have noticed a pattern: many shared libraries have exactly 60KB space allocated in their ...
1
vote
1answer
222 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
207 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
66 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
287 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 ?