10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Oracle Linux 6.
Trying to set up a simple monitoring of memory usage. This command does exactly what I want at the command line:
echo $(date +%Y-%m-%d" "%H:%M:%S) $(grep PageTables /proc/meminfo) >> /home/oracle/meminfo.logBut when I put it in my crontab:
* * * * * echo $(date +%Y-%m-%d"... (2 Replies)
Discussion started by: edstevens
2 Replies
2. Shell Programming and Scripting
Hi Everyone!
I am facing an issue in running a command line utility from the CRON.
This utility displays IPC statistics on UNIX message queues: The "queue name" and the "count" of messages in the queue.
When running this utility from prompt, it will provide an output on the screen, like the... (4 Replies)
Discussion started by: vai_sh
4 Replies
3. Shell Programming and Scripting
Hi, I have a script that seems to run to completion when in the command-line, but when it is run using the cron, it seems to time out.
They both start and run fine, but on the CRON it stops prematurely.
The script hits an API every few seconds and grabs data.
Does anyone have any idea on... (4 Replies)
Discussion started by: phpchick
4 Replies
4. Shell Programming and Scripting
Ubuntu 9.10 is my linux distro
Based on forums they say that the problem is with environment .
here is my case:
login as user, then sudo -s
using this command: s3cmd put file s3://bucket >>worked!
now here is the simple script intended for testing:
#! /bin/bash
env >/tmp/cronjob.log... (1 Reply)
Discussion started by: qwerty20
1 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm wondering how to change the log level to level 2 for cron without manually have to restart it with every boot.
I didn't thing this would be hard to find, but searching has cause me to come up empty.
System is Ubuntu Karmic/9.10
With thanks,
Narnie (6 Replies)
Discussion started by: Narnie
6 Replies
6. UNIX for Dummies Questions & Answers
I have a script which runs fine through command line, but doesn't run through cron. There are some variables which are set by the .profile file which are used by the script. Is it that cront does not pick these variables.
$/export/home/rahul/bin/createfile.sh >>... (3 Replies)
Discussion started by: rahulrathod
3 Replies
7. UNIX for Dummies Questions & Answers
Hey there, I'm a total newbie unix guy here and just picking this stuff up. Have a very small script I put together that works fine from the command line but not once I put it in a cron job. Searched and found this thread and am wondering it it has something to do with setting variables, though the... (7 Replies)
Discussion started by: JackTheTripper
7 Replies
8. Programming
Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Discussion started by: tejbuch
2 Replies
9. UNIX for Advanced & Expert Users
Hi there,
I was wandering, if it is possible to nice set of process on user level.
Say, I have user1,user2
if user1 spawns 12 process and user2 spwans 15 process, Is there a way can I change the priority of any process started by user1 to 5 and viz-a-viz user2 to 20
Thanks in advance (3 Replies)
Discussion started by: braindrain
3 Replies
10. HP-UX
Hi folks,
Hope you can help me. I have a process that is currently running at nice 20 and need it to run faster (-10?). How do I change the process using nice? I have the process number and thought it would be along the lines of;
nice -10 process_id
but it doesn't seem to like that. (1 Reply)
Discussion started by: gshuttleworth
1 Replies
pthread_get_nice_np(3T) pthread_get_nice_np(3T)
NAME
pthread_get_nice_np(), pthread_set_nice_np() - get or set the nice value of a thread
SYNOPSIS
PARAMETERS
thread The thread whose nice value is to be set/retrieved.
nice_val Value of nice to be applied to the target thread is returned (get function) or it specifies the new value of nice for
thread (set function).
DESCRIPTION
These functions are used to set and retrieve the nice value of an individual thread.
returns the current nice value setting of the target thread and stores it in nice_val. adds the value of nice_val to the current nice
value of the target thread.
A thread's nice value is a non-negative number. The system imposes a minimum nice value of 0 and a maximum of 39 with lower nice values
providing more favorable scheduling. If calling results in a nice value outside the range of 0 to 39, the value will be set to the nearest
limit. A process must have appropriate privileges to lower a thread's nice value. The function allows individual threads in the process
to have different nice values.
returns the current nice value less 20 and will be in the range -20 to +19.
The nice value of only system scope threads can be changed. An attempt to change the nice value of a process-scope thread will result in a
return value of Calling on a thread that has a scheduling policy other than will have an effect only when the thread's scheduling policy
changes to If a thread calls the system call to create a new process, the new process inherits the process-level nice value. Calling to
create a new thread will result in the new thread inheriting the creating thread's nice value.
Note
If the nice value of the entire process is changed through or all the threads in the process will have their nice values reset to the new
process-level nice value. The new process's nice value setting overwrites the old thread's setting. Thus its possible that a thread whose
nice value had been set higher than the process-level nice value have its nice value lowered as a result of the process-level re-nicing.
RETURN VALUE
Upon successful completion, and return zero.
Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
If any of the following occur, the and functions return the corresponding error:
A process-scope thread was specified.
The caller does not have permission to lower the nice
value specified in nice_val.
No thread could be found corresponding to
thread.
AUTHOR
and were developed by HP.
SEE ALSO
fork(2), nice(2), setpriority(2), pthread_attr_getschedpolicy(3T), pthread_setschedparam(3T).
Pthread Library pthread_get_nice_np(3T)