06-05-2012
Good story of "researching" on production systems. So people can do anything at anytime at your place?
6 More Discussions You Might Find Interesting
1. Solaris
hi everybody
i'm just recreuted as UNIX system admin...
please tell me from where do i have to begin...
best regards (8 Replies)
Discussion started by: hmaiida
8 Replies
2. Solaris
Tape: Need tape library help please. Need to configure a remote admin card in the L100. Anything helpful.....thxs (2 Replies)
Discussion started by: uwinix77
2 Replies
3. Post Here to Contact Site Administrators and Moderators
i left a message for admin in the wrong thread.. it is in the what is on your mind thread since i can't move it or delete it.. i thought I would mention that I meant it to be in this thread..
sorry about the mistake..
thanx for your patience moxxx68 (3 Replies)
Discussion started by: moxxx68
3 Replies
4. What is on Your Mind?
I'm currently a Windows admin and have wanted to jump ship to the *nix side for a while now. I've been studying both through an lpic level 1 manual as I have time (focusing on debian), and a solaris 10 cert book. The problem is I only have a handful of hours a week to study, and my current job... (3 Replies)
Discussion started by: bobwilson
3 Replies
5. War Stories
I was reading this thread of admin_xor Prize of being an Admin and thought will share this experience of mine which is kind of opposite to what he did - I didn't tell anybody what happened :D
We were porting one of the subsystem from Solaris to Linux. As part of that we developed many wrapper... (23 Replies)
Discussion started by: ahamed101
23 Replies
6. What is on Your Mind?
I am planning to choose my career as Unix/Linux Admin or a DBA. But I have come to know from forums and few admins like the job will be 24/7. I have few questions on that.
Can we get "DAY" shifts in any one of the admin Job ?
Can't we have shift timings in any company ?
Eventhough the... (7 Replies)
Discussion started by: Jacktts
7 Replies
LEARN ABOUT DEBIAN
people
people(2) System Calls Manual people(2)
NAME
people - fetch a structure containing all ttys, whose owner behaves like a human
SYNOPSIS
#include <sys/people.h>
#include <asr.h>
int people (struct ppl_tty **ttys);
DESCRIPTION
The people function fetches a short description of every tty, whose coupled process behaves as an actual human.
It returns a newly malloc'ed array with just enough elements to contain all elements needed for this.
The struct ppl_tty is declared as:
struct ppl_tty {
char tty_path[MAX_PATH_LENGTH];
int is_erratic;
int uses_jobcontrol;
int is_amoron;
int is_aluser;
int has_aclue;
pid_t pgrp_leader;
};
RETURN VALUES
On success people returns the number of elements in ttys , on failure it returns -1 and errno is set to an appropriate value.
ERRORS
ENOENT There are no human-behavioured processes on the system
EBUSY The kernel is busy and will not stand this silly behaviour. Caution to call people again, from the same process, as the kernel
might kill it right away.
ENODEV See ENOENT above.
EUSERS Too many of the people found were lusers. The cut-off for this error is system dependent, but is usually about 3.
EXAMPLE
#include <sys/people.h>
#include <asr.h>
#include <signal.h>
int
main (int argc, char **argv)
{
struct ppl_tty **ttys;
int rv,c;
rv=people(ttys);
if (rv!=-1) {
for (c=0;c<rv;c++)
if ((ttys[c].is_amoron)||(ttys[c].is_aluser)) {
kill(-(ttys[c].pgrp_leader),SIGKILL);
}
} else {
; /* Handle errors in a graceful way... */
}
}
AUTHOR
This man page was written by Ingvar Mattsson, as a contribution to the a.s.r man page collection.
4th Berkeley Distribution Release 0.01 alpha people(2)