Help me in finding process name and argument list without using pstat()


 
Thread Tools Search this Thread
Operating Systems HP-UX Help me in finding process name and argument list without using pstat()
# 1  
Old 12-21-2009
Help me in finding process name and argument list without using pstat()

Hi everybody,
I have an application which displayes the process name and argument list for that each and every process running on the system.
For this purpose the application used the pstat_getproc() method which fetches the structure pst_status.
By this method we get the programm name up to 15 bytes and argument list up to 64 bytes only.Smilie
Now if i want to display a longer programm name and a longer argument list (up to 255 bytes each) i must fetch them using some different method.
Kindly let me know if anybody knows the way in which this can be accomplished.
Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Specifying a list name as argument and using that list in script.

Is there a way I can specify the name of a list as an argument to a shell script and then use the values of that list name in the script? I need to do this WITHOUT using case statements. Something like this: check.sh list1 #!/bin/bash list1="www.amazon.com www.google.com"... (9 Replies)
Discussion started by: gctaylor
9 Replies

2. Shell Programming and Scripting

Argument list too long

Hi Team, Here's the situation. I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir mv /appl/abcd/work_dir /appl/abcd/process_dir The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Discussion started by: kmanivan82
14 Replies

3. Shell Programming and Scripting

Argument list too long!!

Dear Experts, I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........ I wanna execute below command and get the output. How can I achieve it?? Pls help. root# awk -F'|' '$1 == 1' file_20120710* | wc -l /bin/awk: Argument list... (2 Replies)
Discussion started by: Naga06
2 Replies

4. Shell Programming and Scripting

Finding process which ended another process

Hello, The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies

5. UNIX for Advanced & Expert Users

Finding process id of subsequent process

hi all, I am trying to find the process id of the subsequent process created via fork and exec calls in perl. For eg: envVarSetter dataCruncher.exe < input.txt > output.txt When I fork and exec the above command, it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

6. Shell Programming and Scripting

finding * in command line argument

I have to write a script to determine whether given command line argument ($1) contains "*" symbol or not, if $1 does not contains "*" symbol add it to $1, otherwise show message "Symbol is not required". For e.g. If we called this script q5 then after giving , $ q5 /bin Here $1 is /bin, it... (5 Replies)
Discussion started by: cynosure2009
5 Replies

7. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

8. Linux

Need help in finding process

Hello, Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies

9. HP-UX

get CPU speed use pstat APIs

I get my CPU speed use pstat APIs use this program serach google and just test it #include <errno.h> #include <stdio.h> #include <unistd.h> #include <sys/param.h> #include <sys/pstat.h> #define CPU_ID 0 #define HZ_PER_MHZ 1000000 int main() { struct pst_processor pst; union pstun pu; ... (0 Replies)
Discussion started by: alert0919
0 Replies

10. UNIX for Dummies Questions & Answers

finding process id

is there a way to find the process id of a process because i have same process invoked several times. when i need to kill them, i get confused with the id. Thanks, sskb :( (8 Replies)
Discussion started by: sskb
8 Replies
Login or Register to Ask a Question
pthread_nsg_get(3)					     Library Functions Manual						pthread_nsg_get(3)

NAME
pthread_nsg_get - Gets the list of threads in a NUMA Scheduling Group (libpthread library) SYNOPSIS
#include <numa.h> int pthread_nsg_get( nsgid_t nsg, pthread_t *list, long size ); PARAMETERS
Specifies the NUMA Scheduling Group (NSG) from which to retrieve the list of threads. Specifies the address of the array of thread identi- fiers where the list of threads will be written. Specifies the size (in number of thread identifiers) of the array where the list of threads will be written. DESCRIPTION
The pthread_nsg_get() returns into the buffer pointed to by list an array of nsg_thread structures containing the process ids and thread indexes for all threads attached to the specified NSG. The list argument specifies the number of nsg_thread structures that the array must accommodate. To obtain the value for size, the application can first call pthread_nsg_get() with list set to null and read in the value of the nsg_nthread member in the nsgid_ds structure that the call returns. On the second call to pthread_nsg_get(), the application uses the nsg_nthread value for size and includes the appropriate value for list. RESTRICTIONS
The effective user ID of the calling process must be equal to the value of nsg_perm.cuid or nsg_perm.uid in the associated nsgid_ds struc- ture; or the calling process must have read permissions to the NSG. RETURN VALUES
Success. Failure. In this case, the returned integer indicates the type of error. Possible errors are as follows: The calling process does not have read permission on the NSG. The nsg argument does not specify a valid NSG identifier, or the nsg argument is not a valid address. ERRORS
None. SEE ALSO
Functions: nsg_attach_pid(3), nsg_get(3), numa_intro(3), pthread_nsg_attach(3) Files: numa_types(4) pthread_nsg_get(3)