With regards to pico it's unlikely to ever be much cause for concern so it's not the kind of command you would normally nice/renice or ionice. However your command would execute pico niced to +13. Which would mean it would get significantly less time allocated to it. For example, following on from your pico line. Normally pico executed looks like this:
UID PID PPID F CPU PRI NI SZ RSS WCHAN S ADDR TTY TIME CMD
501 20118 20117 4006 0 31 0 2435548 1068 - S eb577e0 ttys000 0:00.03 -bash
501 20136 20118 4006 0 31 0 2434992 772 - S+ 85eed20 ttys000 0:00.00 pico
Where NI is the nice level. If I run pico with your command it looks like this:
UID PID PPID F CPU PRI NI SZ RSS WCHAN S ADDR TTY TIME CMD
501 20118 20117 4006 0 31 0 2435548 1068 - S eb577e0 ttys000 0:00.03 -bash
501 20179 20118 4006 0 18 13 2434992 904 - SN+ 85eed20 ttys000 0:00.01 pico
OK so that demonstrates the command line you run is effective, but what does it actually do? OK let's say you have a system that is quite busy but not obscenely so. It's pretty busy all around the clock, at midnight an essential maintenance task starts. It's mysql command line running a script to generate some daily stats. There's a lot of processing so it hits the CPU hard and the users complain about this. Vehemently, as they do. What can you do about it?
It's not essential how long this script takes so you prepend 'nice -n 13' to the command and the next time it runs it doesn't affect the users so bad but takes a bit longer to complete. The owner of the MySQL script doesn't care as he only wants the stats when he gets in the next day. Everyone is happy.
Stories aside these tools can let you exert some control over how the system prioritises the CPU (possibly IO in the case of ionice) time allocated to tasks. They will only have an effect when the system is loaded, before that everyone tasks are being allocated all the time they need.
The renice command works in a very similar way but it allows you to alter the priority of processes that are already running. So in the above anecdote you could use renice to alter the priority of the mysql command without restarting it. The following command would renice all running tasks named 'mysql' to +13, a much lower priority:
renice -n 13 -p `pidof mysql`
As for ionice I cannot comment but would guess it lets you do similar things with IO. Influencing how much io certain tasks get to perform, e.g. disk read/writes. Could be useful in throttling backup process if necessary?
I wonder if there are any OOM killer on by default.
I don't know about the AIX implementation of things, but Linux of course has an out-of-memory-killer triggering in low-memory conditions. Additionally, you might see resource limits set via ulimit or similar facilities.
We have some cron jobs which cannot be dead otherise the consequence would be davastating.
This is broken by design. Errors occur, failures happen - you have to be able to deal with that.
what are the symptoms, what are the value returned
This depends entirely on the process you are running. It may or may not chose to return meaningful values to the operating system. As it happens, things are tricky with Java exceptions - the shell return code might be zero even after a stack trace so if you can't change the Java code, you should parse the output to catch the errors.
Best Answer
Yes...
You could have the scripts source a particular set of environment variables or just run nice/ionice from within the script...
However, this is not a good resolution to your problem.
nice
andionice
aren't good long-term solutions.ionice
, in fact doesn't have an effect on some of the more performance-based Linux kernel scheduling algorithms. It works with the CFQ scheduler, but chances are that you want to use the deadline scheduler on a server system. That may have a bigger impact than trying to force nice/ionice on the processes.