Hi,
I'm trying to create a new group on an AIX 5.2.0.0. server but am getting the following error:
root:/root $ mkgroup debt
3004-698 Error committing changes to "debt" : Value is invalid.
I've change the group name to no affect.
Does anyone have any ideas what could be causing this?
... (0 Replies)
Hi Everybody,
I want to create a shell script named as say "jip" and it is runned.
And i want that when i do ps + grep for the process than this jip should be shown as process.
Infact there might be process with name jip which is already running. (3 Replies)
Use and complete the template provided. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi, I am creating the phonebook shell script to store the name, number and address of the people. I am stuck in one point.I have done to add new user,... (2 Replies)
Hello,
I am new in AIX please tell how can i create user and add group in this user for example, i want to create user umair and want to add this user primanry group DBA and secondary group ORACLE,how can i do this please tell in detail
Thanks,
Umair (1 Reply)
Hi,
please let me know the commands to create new group/delete existing group in unix and assigning users to newly created group.
Thank you in advance. (2 Replies)
Good afternoon all,
I'll probably confuse everyone as I'm a Windows guy dealing with AIX 6.1 and can't quite figure out how to do something. I have a P520 server running 2 LPARs and we have an IVM (not HMC).Within the IVM under Virtual Storage Management, when I check the Physical Volumes, I have... (4 Replies)
Hi folks,
I have the following data.Any help is greatly appreciated.
order File_name
7222245 7222245.pdf
7222245 7222245a.pdf
7222245 7222245b.pdf
7222245 7222245c.pdf
7222245 7222245d.pdf
7222250 ... (1 Reply)
hi,
I want to create a volume group of 200 GB and then create different file systems on that.
please help me out. Its becomes confusing when the PP calculating PP.
I don't understand this concept. (2 Replies)
I want to create a GROUP with rwx permission. Also, I want to create a GROUP with root privileges, so that next time i create a user, I just need to add it to any of the groups and privileges automatically applied.
please help.
Thanks,
Shouvanik (4 Replies)
Discussion started by: shouvanik
4 Replies
LEARN ABOUT CENTOS
clock_getcpuclockid
CLOCK_GETCPUCLOCKID(3) Linux Programmer's Manual CLOCK_GETCPUCLOCKID(3)NAME
clock_getcpuclockid - obtain ID of a process CPU-time clock
SYNOPSIS
#include <time.h>
int clock_getcpuclockid(pid_t pid, clockid_t *clock_id);
Link with -lrt (only for glibc versions before 2.17).
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
clock_getcpuclockid():
_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L
DESCRIPTION
The clock_getcpuclockid() function obtains the ID of the CPU-time clock of the process whose ID is pid, and returns it in the location
pointed to by clock_id. If pid is zero, then the clock ID of the CPU-time clock of the calling process is returned.
RETURN VALUE
On success, clock_getcpuclockid() returns 0; on error, it returns one of the positive error numbers listed in ERRORS.
ERRORS
ENOSYS The kernel does not support obtaining the per-process CPU-time clock of another process, and pid does not specify the calling
process.
EPERM The caller does not have permission to access the CPU-time clock of the process specified by pid. (Specified as an optional error
in POSIX.1-2001; does not occur on Linux unless the kernel does not support obtaining the per-process CPU-time clock of another
process.)
ESRCH There is no process with the ID pid.
VERSIONS
The clock_getcpuclockid() function is available in glibc since version 2.2.
ATTRIBUTES
Multithreading (see pthreads(7))
The clock_getcpuclockid() function is thread-safe.
CONFORMING TO
POSIX.1-2001.
NOTES
Calling clock_gettime(2) with the clock ID obtained by a call to clock_getcpuclockid() with a pid of 0, is the same as using the clock ID
CLOCK_PROCESS_CPUTIME_ID.
EXAMPLE
The example program below obtains the CPU-time clock ID of the process whose ID is given on the command line, and then uses clock_get-
time(2) to obtain the time on that clock. An example run is the following:
$ ./a.out 1 # Show CPU clock of init process
CPU-time clock for PID 1 is 2.213466748 seconds
Program source
#define _XOPEN_SOURCE 600
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
clockid_t clockid;
struct timespec ts;
if (argc != 2) {
fprintf(stderr, "%s <process-ID>
", argv[0]);
exit(EXIT_FAILURE);
}
if (clock_getcpuclockid(atoi(argv[1]), &clockid) != 0) {
perror("clock_getcpuclockid");
exit(EXIT_FAILURE);
}
if (clock_gettime(clockid, &ts) == -1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
printf("CPU-time clock for PID %s is %ld.%09ld seconds
",
argv[1], (long) ts.tv_sec, (long) ts.tv_nsec);
exit(EXIT_SUCCESS);
}
SEE ALSO clock_getres(2), timer_create(2), pthread_getcpuclockid(3), time(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2013-07-04 CLOCK_GETCPUCLOCKID(3)