Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pget(9) [freebsd man page]

PGET(9) 						   BSD Kernel Developer's Manual						   PGET(9)

NAME
pget -- locate a process by number SYNOPSIS
#include <sys/param.h> #include <sys/proc.h> int pget(pid_t pid, int flags, struct proc **pp); DESCRIPTION
This function takes a pid as its argument, which can be either a process or thread id, and fills a pointer to the proc structure in *pp. In the latter case, a process owning the specified thread is looked for. The operation is performed by invoking the pfind(9) function. The found process is returned locked. For the PGET_HOLD case, it is returned unlocked (but held). The pget() function can perform additional manipulations, depending on a flags argument. The flags argument is the logical OR of some subset of: PGET_HOLD If set, the found process will be held and unlocked. PGET_CANSEE If set, the found process will be checked for its visibility. See p_cansee(9). PGET_CANDEBUG If set, the found process will be checked for its debuggability. See p_candebug(9). PGET_ISCURRENT If set, the found process will be checked that it matches the current process context. PGET_NOTWEXIT If set, the found process will be checked that it does not have the process flag P_WEXIT set. PGET_NOTINEXEC If set, the found process will be checked that it does not have the process flag P_INEXEC set. PGET_NOTID If set, pid is not assumed as a thread id for values larger than PID_MAX. PGET_WANTREAD If set, the found process will be checked that the caller may get a read access to its structure. A shorthand for (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT). RETURN VALUES
If the process is found in the specified way, then zero is returned, otherwise an appropriate error code is returned. SEE ALSO
p_candebug(9), p_cansee(9), pfind(9) BSD
May 3, 2014 BSD

Check Out this Related Man Page

P_CANDEBUG(9)						   BSD Kernel Developer's Manual					     P_CANDEBUG(9)

NAME
p_candebug -- determine debuggability of a process SYNOPSIS
#include <sys/param.h> #include <sys/proc.h> int p_candebug(struct thread *td, struct proc *p); DESCRIPTION
This function can be used to determine if a given process p is debuggable by the thread td. SYSCTL VARIABLES
The following sysctl(8) variables directly influence the behaviour of p_candebug(): kern.securelevel Debugging of the init process is not allowed if this variable is 1 or greater. security.bsd.unprivileged_proc_debug Must be set to a non-zero value to allow unprivileged processes access to the kernel's debug facilities. RETURN VALUES
The p_candebug() function returns 0 if the process denoted by p is debuggable by thread td, or a non-zero error return value otherwise. ERRORS
[EACCESS] The MAC subsystem denied debuggability. [EAGAIN] Process p is in the process of being exec()'ed. [EPERM] Thread td lacks super-user credentials and process p is executing a set-user-ID or set-group-ID executable. [EPERM] Thread td lacks super-user credentials and process p's group set is not a subset of td's effective group set. [EPERM] Thread td lacks super-user credentials and process p's user IDs do not match thread td's effective user ID. [EPERM] Process p denotes the initial process initproc() and the sysctl(8) variable kern.securelevel is greater than zero. [ESRCH] Process p is not visible to thread td as determined by cr_seeotheruids(9) or cr_seeothergids(9). [ESRCH] Thread td has been jailed and process p does not belong to the same jail as td. [ESRCH] The MAC subsystem denied debuggability. SEE ALSO
jail(2), sysctl(8), cr_seeothergids(9), cr_seeotheruids(9), mac(9), p_cansee(9), prison_check(9) BSD
November 19, 2006 BSD
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SNMPGET unix script - help

Hi need urgent help , for creating unix script . To collect system name,This is command i want to execute n (integer) no. of times for for a differnt IP addresses .IP is variable in every execution. Other string & collecter name is constant . snmpGet %IP% sysName.0 -c <string> -S <datacollecter... (3 Replies)
Discussion started by: langdatyagi
3 Replies

2. UNIX for Advanced & Expert Users

snmpget command not working

HI to all Unix gurus and Lovers, I am having one snmpd problem somewhat strange. When I execute 'snmpget -v2c -c public <local_ip> system.sysDescr.0' initially 4-5 times it executes properly,But after that it gives a message of 'Timeout: No Response from... (0 Replies)
Discussion started by: jagdish.machhi@
0 Replies

3. Shell Programming and Scripting

snmpget in a perl programme

Hi Guyz can u tell me how to write a programme in perl using snmpget. Regards' Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies

4. UNIX for Advanced & Expert Users

snmpget/snmpwalk for dskPercent not working.

snmpwalk -v1 -c myname {ip address} dskPercent. Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: UCD-SNMP-MIB::dskPercentNode snmpget -v1 -c myname {ip address} dskPercent.1 Error in packet Reason: (noSuchName) There is no such variable... (0 Replies)
Discussion started by: ynilesh
0 Replies

5. Shell Programming and Scripting

automate ftpget to multiple hosts

Hi Folks, I have scanned the threads all day and have not found anything close enugh to what I need. I'm probably more confused now than before. Here's what I'm trying to do: 1. automate for running in the early am. (I think I can handle the cron part) 2. get the newest file from a... (5 Replies)
Discussion started by: huntfishtrap
5 Replies

6. Solaris

Net-SNMP v5.4 - sub-id not found in log, but can query with snmpget and snmpwalk

Hi everyone, I'm configuring Net-SNMP v5.4 on Solaris 10, sending traps to OpenNMS 1.2.9-0.20061212.0. I'm setting up disk monitoring (% of space free) for 5 directories. Here's what I'm working with: (snmpd.conf - disk and monitoring portions) # # Disk Usage monitoring: # disk / 20%... (0 Replies)
Discussion started by: Mariognarly
0 Replies

7. Infrastructure Monitoring

snmpget not working on AIX shared wpar

Hi, I have a shared AIX wpar configured. I have started snmpd process on shared AIX wpar. But when i tried to query a MIB id using the following command /opt/OV/bin/snmpget -d -v 1 -c public -p <hostname> .1.3.6.1.2.1.1.7.0 i get the following error message #... (0 Replies)
Discussion started by: avazeer
0 Replies

8. AIX

snmpget not working on AIX shared wpar

(0 Replies)
Discussion started by: avazeer
0 Replies

9. Shell Programming and Scripting

snmpget

Good morning All, I'm just wondering if I can get help with writing a simple script that check for Community names and make a comparison to the new community name given. Thanks T (0 Replies)
Discussion started by: lemseffert
0 Replies

10. UNIX for Dummies Questions & Answers

ncftpget

Thanks in advance for any help. I'm trying to use ncftpget to move several files (with the same file extention) from my FTP server to another server. Instead of using the -DD option to delete the files after transfer, is there any way I can rename the files or move them to another directory on... (0 Replies)
Discussion started by: Jlaib
0 Replies