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
tt_open(library call)													     tt_open(library call)

NAME
tt_open -- return the process identifier for the calling process SYNOPSIS
#include <Tt/tt_c.h> char *tt_open(void) DESCRIPTION
The tt_open function returns the process identifier for the calling process. RETURN VALUE
The tt_open function also sets this identifier as the default procid for the process. The tt_open(3) function is typically the first ToolTalk function called by a process. The application must call tt_open(3) before other tt_ calls are made. However, there are two exceptions: tt_default_session_set(3) and tt_X_session(3) can be called before tt_open. A process can call tt_open more than once to obtain multiple procids. To open another session, the process must make the following calls in the order specified: tt_default_session_set tt_open RETURN VALUE
Upon successful completion, the tt_open function returns the character value that uniquely identifies the process. The application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned pointer: TT_OK The operation completed successfully. TT_ERR_NOMP The ttsession(1) process is not running and the ToolTalk service cannot restart it. APPLICATION USAGE
The application should use tt_free(3) to free any data stored in the address returned by the ToolTalk API. Each procid has its own associated file descriptor, and can join another session. To switch to another procid, the application should call tt_default_procid_set. SEE ALSO
Tt/tt_c.h - Tttt_c(5), tt_fd(3), tt_default_procid(3), tt_default_procid_set(3), tt_default_session(3), tt_default_session_set(3), tt_ptr_error(3), tt_free(3). tt_open(library call)