04-19-2011
how to display pid and other parameters of current process through kernel module ?
how to display pid and other parameters of current process in linux platform ?
i know it can be done through a linux commmand ps -F
but i want it done through kernel program
thanks in advance
10 More Discussions You Might Find Interesting
1. HP-UX
Good Day
Please couls somebody tell me how to display Configurable Kernel parameters from the command line. I am able to do it from SAM,but would like to dump the command line output to a text file so I can email it off to HP.
Kind Regards
Shawn (1 Reply)
Discussion started by: shawnbishop
1 Replies
2. SuSE
Hi All,
Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff.
Cheers,
Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies
3. UNIX for Dummies Questions & Answers
All,
I've got a script that needs to check if it was started by cron. The code seems to be right, but it's not running correctly if cron starts it. Am I getting the pid's correctly? I'm not having any luck figuring it out. :confused: Any help is appreciated!
CRON_ID=$(ps -aef | grep... (1 Reply)
Discussion started by: GregWold
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ?
The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Discussion started by: macL
3 Replies
6. Linux
Hi all,
I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/.
I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies
7. Solaris
Hi gurus
Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value
Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies
8. Linux
Hi,
if I install a module with specific parameter, will this parameters applied next time system boots?
for exampe, I want to disable InterruptThrottleRate
modprobe e1000e InterruptThrottleRate=0
Is this parameter apllied only for this run, or this module will always use this parameter when... (2 Replies)
Discussion started by: Shedon
2 Replies
9. Linux
Hi everyone,
I am trying to prevent the ehci_hcd kernel module to load at boot time.
Here's what I've tried so far:
1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here):
2) Blacklisted the module by adding the following string to
3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies
10. Shell Programming and Scripting
I'm trying to create a ksh script to do the following:
1) Ask the user what process they want to search for.
2) Have the script read the input as a variable and use it to search for the process.
3) Display the current time & date, the working directory of the process, and finally display the... (6 Replies)
Discussion started by: seekryts15
6 Replies
LEARN ABOUT REDHAT
sched_setparam
SCHED_SETPARAM(2) Linux Programmer's Manual SCHED_SETPARAM(2)
NAME
sched_setparam, sched_getparam - set and get scheduling parameters
SYNOPSIS
#include <sched.h>
int sched_setparam(pid_t pid, const struct sched_param *p);
int sched_getparam(pid_t pid, struct sched_param *p);
struct sched_param {
...
int sched_priority;
...
};
DESCRIPTION
sched_setparam sets the scheduling parameters associated with the scheduling policy for the process identified by pid. If pid is zero, then
the parameters of the current process are set. The interpretation of the parameter p depends on the selected policy. Currently, the follow-
ing three scheduling policies are supported under Linux: SCHED_FIFO, SCHED_RR, and SCHED_OTHER.
sched_getparam retrieves the scheduling parameters for the process identified by pid. If pid is zero, then the parameters of the current
process are retrieved.
sched_setparam checks the validity of p for the scheduling policy of the process. The parameter p->sched_priority must lie within the range
given by sched_get_priority_min and sched_get_priority_max.
POSIX systems on which sched_setparam and sched_getparam are available define _POSIX_PRIORITY_SCHEDULING in <unistd.h>.
RETURN VALUE
On success, sched_setparam and sched_getparam return 0. On error, -1 is returned, errno is set appropriately.
ERRORS
ESRCH The process whose ID is pid could not be found.
EPERM The calling process does not have appropriate privileges. The process calling sched_setparam needs an effective uid equal to the
euid or uid of the process identified by pid, or it must be a superuser process.
EINVAL The parameter p does not make sense for the current scheduling policy.
CONFORMING TO
POSIX.1b (formerly POSIX.4)
SEE ALSO
sched_setscheduler(2), sched_getscheduler(2), sched_get_priority_max(2), sched_get_priority_min(2), nice(2), setpriority(2), getprior-
ity(2),
sched_setscheduler(2) has a description of the Linux scheduling scheme.
Programming for the real world - POSIX.4 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0
IEEE Std 1003.1b-1993 (POSIX.1b standard)
ISO/IEC 9945-1:1996
Linux 1.3.81 1996-04-10 SCHED_SETPARAM(2)