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_CANSEE(9) BSD Kernel Developer's Manual P_CANSEE(9)NAME
p_cansee -- determine visibility of a process
SYNOPSIS
#include <sys/param.h>
#include <sys/proc.h>
int
p_cansee(struct thread *td, struct proc *p);
DESCRIPTION
This function can be used to determine if a given process p is visible to the thread td, where the notion of ``visibility'' may be read as
``awareness of existence''.
The function is implemented using cr_cansee(9), and the dependencies on sysctl(8) variables documented in the cr_cansee(9) manual page apply.
RETURN VALUES
The p_cansee() function returns 0 if the process denoted by p is visible by thread td, or a non-zero error return value otherwise.
ERRORS
[ESRCH] Process p is not visible to thread td as determined by cr_cansee(9).
[ESRCH] Thread td has been jailed and process p does not belong to the same jail as td.
[ESRCH] The MAC subsystem denied visibility.
SEE ALSO jail(2), sysctl(8), cr_cansee(9), mac(9), p_candebug(9), prison_check(9)BSD November 19, 2006 BSD
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)
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)
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)
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)
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)
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)
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)
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)