You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
3.3 KiB

<h1>Personal Responsibility on SDF's Multi-User Environment</h1>
<p>As SDF's mission is to support the advancement of public education, cultural enrichment, scientific
research and recreation, you are <em>encouraged</em> to be creative and bold in your use of the numerous
resources available with your membership level. While you are getting to work on projects, just please keep
an eye on your resource usage so that you do not adversely impact the enjoyment of this system by others.
Bugs in your code or other errors can devour the CPU from time to time, and mistakes like these are part of
the learning process, but conscious overuse of system resources will likely get your processes killed and,
possibly, your account locked. Luckily you have your fellow users to alert you if you're accidentally
exceeding a fair share of system resources.</p>
<p>The 'top' command is a great tool if you want to see what is causing system sluggishness, or if you just
want to monitor your own system resource usage. A quick web search for "unix process monitoring tools" will
give you a host of other tools as well.</p>
<p>If you observe system use that is bringing the system to its knees, please reach out to the user to let
them know. Email is an obvious way to contact them, or try checking their SDF web or gopher site for other
contact information. If that fails, make a post on <a
href="">bboard</a> describing the problem and others may be able to
<p>Beyond simply monitoring your resource usage, you can set limits that will prevent a
misfiring program from consuming excessive resources. This is especially important for
MetaARPA members who have higher limits on system resource usage.</p>
<p>Most shells have a <b>ulimit</b> command which can be used to view or set limits. See
<tt>man 3 ulimit</tt> or (in some shells) <tt>ulimit --help</tt>. This shell command calls
the C runtime library's ulimit() call which itself calls into the Unix system calls for
getrlimit() and setrlimit().</p>
<tt>ulimit -a</tt> will display all of your current limits:
<pre> $ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 80133
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 80133
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited</pre>
<p>You can see from this display that the user has unlimited cpu time. To add a 1000 second
limit to cpu time, issue the following command:</p>
<p><tt>ulimit -t 1000</tt></p>
<p>Note that, once set, you cannot increase the limit without killing the limited process and
starting a new one. If you run this command directly from the shell, you will need to log
out of the shell and back in again to reset it.</p>
$Id: multiuser-responsibility.html,v 1.5 2020/02/28 02:10:14 cmccabe Exp $