stime(2) System Calls Manual stime(2)NAME
stime() - set time and date
The system call sets the system time and date. tp points to the value of time as measured in seconds from 00:00:00 on January 1, 1970,
Coordinated Universal Time (UTC).
Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser will have this privi-
lege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information
about privileged access on systems that support fine-grained privileges.
returns the following values:
is set to indicate the error.
If fails, is set to one of the following values.
The calling process does not have the
The parameter points to an invalid (negative) time value.
The parameter is an invalid address.
SEE ALSO date(1), gettimeofday(2), time(2), privileges(5).
STANDARDS CONFORMANCE stime(2)
Check Out this Related Man Page
nice(2) System Calls Manual nice(2)NAME
nice - change priority of a process
adds the value of priority_change to the nice value of the calling process. A process's is a positive number for which a more positive
value results in lower CPU priority.
A maximum nice value of 39 and a minimum nice value of 0 are imposed by the system. Requests for values above or below these limits result
in the nice value being set to the corresponding limit.
If the calling process contains more than one thread or lightweight process (i.e., the process is multi-threaded) this function shall apply
to all threads or lightweight processes in the calling process.
Some or all of the actions associated with this system call are subject to compartmental restrictions. See compartments(5) for more infor-
mation about compartmentalization on systems that support that feature. Compartmental restrictions can be overridden if the process pos-
sesses the privilege (COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes owned by any user may have
this privilege, depending on system configuration.
Some or all of the actions associated with this system call require the (OWNER) and/or the (LIMIT) privileges. Processes owned by the
superuser will have these privileges. Processes owned by other users may have privilege(s), depending on system configuration. See privi-
leges(5) for more information about privileged access on systems that support fine-grained privileges.
Upon successful completion, returns the new nice value minus 20. Otherwise, a value of -1 is returned and is set to indicate the error.
Note that assumes a user process priority value of 20. If a user having appropriate privileges has changed the user process priority value
to something less than 20, certain values for priority_change can cause to return -1, which is indistinguishable from an error return.
[EPERM] fails and does not change the nice value if priority_change is negative or greater than 40, and the effective user ID of the
calling process is not a user having appropriate privileges.
SEE ALSO nice(1), renice(1M), exec(2), privileges(5).
STANDARDS CONFORMANCE nice(2)
I wish to set the time and date of the system from my application. (I write code in C ).
How can it be done?
I found the function stime() - but it gets time in seconds as a parameter, and I don't know how to convert my time & date to seconds since EPOCH.
What's the best... (0 Replies)
I have been trying to complete a shell script where, I need to increment the date depending on the file (depending on the date) availability on the remote server.
Basically, I will be passing a counter (like parameter 1 or 2 or 3 or 4).
First I will check for the... (1 Reply)
how to get the same time in two systems,
in one system i have the correct time, and second system i have wrong time.
now i want the first sytem to second sytem, i dont to want to do this work manually.
i know there is one command to get the time. in ntp.
... (3 Replies)
Frineds I need assistance in writing a script . Newbie to scripting.
How to find list of processes that are running more than an hour . Below i used the step to get the etime and stime . Now by getting the result i need to display longer time process with full listing.
ps -aef -o... (10 Replies)
I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330.
The system gives me an error invalid option.
This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)