processinfo is a system call for Linux kernel.
-
Compiled on Linux-4.19.161.
-
processinfo.c is for Kernel Space.
-
processinfo_usr.c is for User Space.
-
Customize and use these
335 common mysyscallib __x64_sys_mysyscallib;
asmlinkage long sys_mysyscallib(char*, int, char __user *);
● without argument, it prints the right usage of this program.
● “-all”, it lists all the processes and some information about them.
● “-p processID”, it outputs the given process ID and its command line.
● “-k processID”, it kills the given process ID
The sample executing formats and its functionality shortly.
./processinfo.out >> program’s right usage
./processinfo.out -all >> all processes some information
./processinfo.out -p 1425 >> process and its cmdline
./processinfo.out -k 1425 >> kill process