Questions tagged [proc]

The proc filesystem in Unix-like operating systems presents information about processes and other system information. Typically, it is mapped to a mount point named `/proc` at boot time.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

why can't I edit /proc/sys/kernel/perf_event_max_sample_rate with vi

I'm root, running Centos8 on bare mental and permissions on /proc/sys/kernel/perf_event_max_sample_rate are as follows -rw-r--r--. 1 root root 0 Oct 3 14:00 perf_event_max_sample_rate I want to ...
0
votes
0answers
72 views

Different ipv6 addresses in /proc/net/if_inet6 and /proc/net/tcp6

I want to ask You, why I have strange ipv6 addresses in /proc/net/tcp6. Example: bash cat /proc/net/if_net6 Gives me: 2a02a313024174809849a58c3f611035 02 40 00 01 ens5 ...
0
votes
0answers
48 views

Missing hardware information on Raspberry Pi

So I tried to run a Python script on the Pi(ubuntu arm) that contains a call on the RPi.GPIO library which results in a runtime error. from RPi._GPIO import * RuntimeError: This module can only be ...
0
votes
0answers
28 views

How can I tell if another process is blocking for input from stdin?

On Arch Linux, I often minimize the terminal window in which I am upgrading my system to work on something else. I usually do this while pacman is resolving dependencies, which can take a long time on ...
1
vote
0answers
111 views

Failed to open /proc/self/stat [closed]

This is a question about the behavior of centos 7. More specifically the /proc system within centos 7 and how it behaves when accessing it programmatically. I have some code that periodically reads /...
1
vote
1answer
434 views

What is the difference between “mount -t …” and “mount -o bind …” with regard to chroot environment

So I am setting up a chroot where I need proc, sys and dev folders. I have read that I need to mount them as follows: mount -t proc /proc /mnt/chroot/proc mount -t sysfs /sys /mnt/chroot/sys mount -...
1
vote
0answers
57 views

Use mount to access a “proc” folder with my user

Is it possible to use mount to access a "proc" folder with my user? Hypothetical example: mount -t proc -o umask=0022,gid=<MY_GID>,uid=<MY_UID> /proc/<MY_PID>/root /home/<...
1
vote
1answer
268 views

Why doesn't /proc take up disk space?

Why doesn't /proc take up disk space? When I put sudo du -sh /proc it return 0. I think that is something related to its purpose, but I'm not sure. Why?
1
vote
1answer
47 views

How can I get unlimited information from pstree?

I am using pstree to watch a sequence of scripts and even when using -pla, I get shortened versions of arguments and script names. As an example: sshd,13431 └─bash,13432 └─runJobs.sh,18780 ./...
1
vote
2answers
733 views

Is it possible to run a process in chroot with virtual /proc filesystem under Linux?

I need to run a process in a chroot with a virtual /proc filesystem, so the process is unable to get access to other processes running on the same host. The process must be run under root and have ...
5
votes
1answer
1k views

Why do symbolic links in /proc/$PID/fd/ act as hard links?

When the target of a symbolic link is deleted, it points to nothing and there's no way to get to the content of the deleted target. Files in /proc/$PID/fd/ are displayed as symbolic links, but they ...
0
votes
2answers
572 views

Strange listening port

Auditing one of my systems, I found a process without name listening on localhost, port 52698. # netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address ...
2
votes
0answers
696 views

How to find out the reason why ssh processes are hanging?

When i run command like iostat -dkx 2 2 via ssh, I get the expected result, but the processes on the local computer are saying alive in status "interruptible sleep". Why is this happening? Is there a ...
0
votes
0answers
264 views

/proc/partitions lists no entries

I'm trying to use the DiskIO plugin with glances, but it's not showing. Digging around in the code, I've found that the psutil.disk_io_counters() file is throwing an error, complaining about no ...
1
vote
1answer
618 views

Which devices in /sys/block are HDDs?

I'm interested which devices in /sys/block are real HDD drives: [root@sdp1a block]# pwd /sys/block [root@sdp1a block]# ls dm-0 dm-12 dm-3 dm-7 loop1 loop5 ram1 ram13 ram3 ram7 sdaa sdae ...
2
votes
1answer
1k views

What is the policy for permissions on /proc/<PID>/environ?

I see, that usual user process gets user-readable permissions: -r-------- 1 1000 1000 0 Nov 19 13:51 /proc/9083/environ but f.ex. SCREEN daemon gets root ownership: -r-------- 1 root root 0 Nov 19 ...
2
votes
1answer
818 views

Permanent permissions change on /proc

I have a Kopete plug-in that tries to blink my Thinkpad light when I have a new incoming message. To accomplish this it uses a /proc virtual file provided by the thinkpad-acpi kernel module, situated ...
4
votes
2answers
2k views

/proc/cpuinfo doesn't show CPU frequency at all

/proc/cpuinfo doesn't show CPU frequency at all. I built the kernel on my own. Did I miss some kernel configuration? pi@raspberrypi ~ $ cat /proc/cpuinfo processor : 0 model name : ARMv6-...
2
votes
1answer
9k views

Linux: command to find out number of cores the process is running on at any instance [duplicate]

What is the command to find out number of cores the process is running on at any instance ? -Thanks
0
votes
3answers
2k views

How do I get the number of processes that have been created since the last boot on a Linux machine

How do I get the number of processes that have been created since the last boot on a Linux machine? I want to get it from a C++ program. Which proc file stores it?
0
votes
3answers
2k views

Get hard disk size without df

How to check a vendor's statement about a hard disk size? df shows results partition oriented (including tmpfs), one has to execute it and count label oriented. How to get in a single command or cat /...
2
votes
1answer
407 views

Why tail -f is not working for a proc file?

I have a proc file which is updated by a driver. In user space I am reading using tail. It is working fine, But when i give -f option for tail, It is not working. This means it is reading file ...
4
votes
1answer
8k views

Permission denied when setting values in sysctl on Ubuntu 12.04

I am trying to configure my Ubuntu 12.04 VPS (OpenVZ) to reboot when it runs out of memory. To do this I have added following lines to my "/etc/sysctl.conf" file. vm.panic_on_oom = 1 kernel.panic = ...
62
votes
5answers
11k views

How does /proc/* work?

There are many files in /proc, like /proc/cpuinfo, /proc/meminfo, /proc/devices and so on, which, when opened, return system information. These files do not seem to have any existence in reality, as ...
3
votes
1answer
2k views

How to enable sched_compat_yield?

I am not able to see the sched_compat_yield entry under /proc/sys/kernel/. How to enable this propery in the kernel (so that I can tweak it for some debugging purpose) ? Currently Available Entries: ...
1
vote
0answers
188 views

Issues with Pro*C compilation on Suse linux

Would someone please explain what all environment variables needs to be set prior compiling Pro*C code On Suse Linux. I have tried setting up Oracle_Home, Path and LD Library path according to the ...
0
votes
1answer
453 views

Why `/proc` file system should be mounted when re-install GRUB from `chroot`?

Currently, the MBR on my machine is corrupted, so I decide to re-install GRUB from a liveCD and with chroot. From this tutorial, I can complete the re-installation. However, I'm not clear about the ...
0
votes
3answers
135 views

directory in /proc/sys/net/ipv4/config have no hard links?

Why the directories inside /proc/sys/net/ipv4/config have no hard links? ls -l /proc/sys/net/ipv4/conf total 0 dr-xr-xr-x 0 root root 0 Dec 31 08:27 all dr-xr-xr-x 0 root root 0 Dec 31 08:27 default ...
43
votes
1answer
78k views

cat /proc/meminfo what do all those numbers mean

In reading the man page on the free command in Linux. I found that is gets its info from /proc/meminfo. I understand a few of the entries, like MemTotal and MemFree. What do the rest mean. cat /...
6
votes
1answer
10k views

How can I get the number of threads running in a process from /proc/[pid]/stat in Linux?

I have the pid of the process. I would like to know the current number of thread running in the process. I know I can read /proc/pid/stat for this information, but I'm not sure how to specifically get ...
6
votes
1answer
11k views

Bash: permission denied for file write

I followed this tutorial guide on "How to Create Linux Proc Files in C Program using LKM". I've successfully made my module and loaded it in. Now I want to echo to my proc file to make sure the ...
2
votes
2answers
6k views

/proc filesystem in AIX

This question is in context of AIX (5.3) On what basis does space gets allocated for whatever needs to be stored under the virtual filesystem /proc Does the OS grabs space from / ? For instance I ...
4
votes
2answers
3k views

What is “ln -L” (--logical) for?

I can read in the ln man page: -L, --logical make hard links to symbolic link references I read somewhere that ln -L could be used to re-link files that were deleted but which are still ...
3
votes
2answers
981 views

What do the different /proc/bus/pci/0x directories represent?

What do the different /proc/bus/pci/0x directories represent? Do they represent the different PCI/PCI-E sockets on a board? If I have one mini pci and 2 PCI-E sockets on my board, should I be seeing ...