![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Identifying and grouping OS processes and APP processes | wilsonee | SUN Solaris | 2 | 09-30-2008 10:26 AM |
| Monitoring Processes - Killing hung processes | ukndoit | UNIX for Advanced & Expert Users | 4 | 01-17-2008 04:30 AM |
| How to enumerate samba shares with client | siegfried | IP Networking | 1 | 08-21-2006 01:00 PM |
| processes | mma_buc_98 | UNIX for Dummies Questions & Answers | 1 | 08-13-2002 06:25 PM |
| co-processes | UNIX for Dummies Questions & Answers | 1 | 07-27-2002 10:07 PM | |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Again for windows I can enumerate processes using toolhelp library Code:
PROCESSENTRY32 pe32 = {0};
HANDLE hsp = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
pe32.dwSize = sizeof( PROCESSENTRY32 );
Process32First( hsp, &pe32 );
do
{
// access PROCESSENTRY32 values
/*
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's threads
DWORD dwFlags;
CHAR szExeFile[MAX_PATH]; // Path
*/
} while( Process32Next( hsp, &pe32 ) );
Is there any way to do it in linux/unix,. Ineed process ID, parent process Id and process name. I tryes to scan /proc/ folder but I cannot figure out the subfolders and files. Thank you The red icon (on the top-left) is a hand or a question mark ? I thought is a Q mark |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|