I need to know physical memory consumption of my Go process in Linux. What I need is Resident Set Size (RSS). runtime.ReadMemStats is not suitable because there is no way to get a size of a portion of a virtual memory that is resident. syscall.Getrusage is not suitable because it returns only Maxrss that is m…
get process inode using netlink
I want to try and correlate an IP packet (using libpcap) to a process. I have had some limited success using the relevant /proc/net/ files but found that on some of the machines i’m using, this file can be many thousands of lines and parsing it is not efficient (caching has alleviated some performance p…
Convert Scientific Notation into decimal number using bash [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 3 years ago. Improve this question I nee…
Why does the file in a subdirectory not get copied?
I have to make a script which will copy all files from a certain location starting with “db.” to another location. My script works fine for all files which are directly in the directory, but it doesnt copy any files which are in subdirectorys. I have used the parameter -r, which should copy everyt…
How do I copy files in the same directory with a number changed of filename
I would like to copy mutiple files using patterns for a new file name. For example: How do I copy these files into the following filename automatically using bash-script? Many thanks Answer This copies all files in the current directory, replacing 1 with 2. It’s not really useful as it serve a very spec…
Making changes with ifconfig persistent [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
SYS_READ call only works once, seemingly skips over code when ran again
I’m trying to rewrite a little text game in assembly for fun, and I noticed that I’m only able to run the following code successfully once. If I run it again elsewhere, it will seemingly skip over the code. I am compiling using the following command: nasm -f elf64 -o test.o textgame.s && l…
How to grant permissions to VS Code to modify files in Windows Subsystem for Linux [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
“The ClusterRoleBinding “kubernetes-dashboard” is invalid: roleRef: Invalid value” when deploying Web UI
I’m trying to deploy Kubernetes Web UI as described here: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ My system configuration is as follows: After starting the minukube cluster minikube start I created a Service Account and ClusterRoleBinding as described here: https://…
Not able to connect to AWS server using linux terminal after a reboot with “sudo service sshd restart”. Getting “Connection timed out” error
I was trying to edit the sshd_config file and in between that my machine crashed. When I tried again it started showing the below message- I deleted the .swp file but it looks like the original file got deleted. After that I ran this command “sudo service sshd restart “. Now I am not able to conne…