Here are a few tips for using your ACMS account.

What is my spis15xx account?

Your spis15xx account (where xx are two letters such as aa, ah, bc, etc.) is a username and password that allows you to login to the computers in the basement of the UC Sa Diego CSE building.    You can also login to the computer ieng6-240.ucsd.edu using ssh (the Secure Shell.)</div>

How long will I have my spis15xx account?

You will have it until the end of the SPIS program, but sometime after that, it will be disabled.</div>

So be sure that before SPIS ends, anything you want to save after SPIS ends is copied somewhere else.  </div>

</div>

Note: your github repos will stay around for a while longer. They are likely to stick around  for months, or even years after SPIS ends.    Github.com hasn’t made any guarantees for how long they will stick around, but they haven’t expressed any need to get rid of them either.   They will probably stay around as long as github.com is in business.       So, anything you push into a github.com repo is probably still accessible to you after SPIS is over.</div>

</div>

What is Linux and Unix, and how does it related to my spis15xx account?

The computers running in B230 and B240—as well as the one you access when use “ssh” to remotely access ieng6-240.ucsd,edu are running an operating system called Linux.  (Examples of other operating systems, or OSs, include Windows, MacOS, iOS, and Android.) </div>

Linux is a part of a family of operating systems collectively known as Unix-based OSs, or the Unix family of OSs.</div>

What is a terminal session/shell prompt/unix prompt/linux prompt?

When using a Linux or Unix based system, we make a lot of use of the so-called “terminal session”.  The place where you type commands into a terminal session goes by various names.</div>

• Shell prompt
• Confusing, the Python Read-Eval-Print Loop (REPL) is also sometimes called the Python Shell Prompt.  But that's something else entirely.
• By itself, "shell prompt" usually means the terminal session shell prompt.
• Linux prompt
• Unix prompt
• Command prompt

Tips for Using your ACMS Account

How to diagnose a disk quota problem

If you suddenly are finding that multiple things that usually work on your ACMS account are not working, e.g. IDLE locks up, web browser locks up, can’t open new windows, commands fail with strange error messages, etc., it may be a sign that you are over disk quota.</div>

</div>

You can see whether disk quota is the problem by typing quota -vs at the Unix prompt.  That looks like this:
[spis15t7@ieng6-240]:~:501$quota -vs Disk quotas for user spis15t7 (uid 4091): Filesystem blocks quota limit grace files quota limit grace acsnfs4:/vol/home/linux/ieng6 57328 196M 196M 3214 4000 4000 [spis15t7@ieng6-240]:~:502$ 

• The number 196M in the output above indicates that your quota and your limit in terms of how much disk space you are allowed to consume on your ACMS account is 196 MB (Megabytes).

• The number 57328 in the output above indicates that you are using 57328 blocks of your quota.     That's fine (a block is usually either 0.5KB or 1KB, and there are 1024KB in a MB.)  So this output indicates a "good" situation.

Here’s what you DON’T want to see:</div>

[spis15t7@ieng6-240]:~:501$quota -vs Disk quotas for user spis15t7 (uid 4091): Filesystem blocks quota limit grace files quota limit grace acsnfs4:/vol/home/linux/ieng6 196M 196M 196M 3214 4000 4000 [spis15t7@ieng6-240]:~:502$ 

That’s an example of a problem.  The usage and the quota are the same, meaning that you’ve used up all of your available disk quota.   If you try to write to any additional file, you’ll end up having trouble.   </div>

Do you have a “disk space” problem, or a “number of files” problem?

The number 3214 in the output above is the “number of files”.  In this example, it is below the quota of 4000, so all is well.  BUT, if it were above the 4000, we’d have a “too many files” problem.   Those are investigated in different ways.  Read on!</div>

What is causing this?

The thing is, it’s unlikely that you filled up your disk with ordinary Python files.  The problem is more likely some kind of bug either in the system software, or in one of your own programs, that is making REALLY big files somewhere unexpected.  You need to find where the problem is before you can fix it.</div>

How to solve a disk quota problem

TEMPORARY VERSION OF INSTRUCTIONS:

TODO: Make these nicer.</div>

1) Finding the problem
cd                        (goes to home directory)
du –sh *          (check regular folders)
du –sh .[A-z]*            (check hidden folders)
2) Probably:
If its huge (i.e. >50MB) use echo rm –rf ~/.config/google-chromethen
up-arrow,
and erase “echo”, then return again</div>

How to solve a too many files problem

Unlike “disk space”, there isn’t a nice handy utility built into unix to count the number of files you have.  Fortunately, one of my colleagues at UC Santa Barbara, wrote such a utility, and has put it up on his public github repo here: https://github.com/rkip/countfiles</div>

I’ve put that in my own directory on ACMS for SPIS 15, so you can run it with this command:</div>

~spis15t7/bin/countfiles</div>

If you run that, it will show you which directory has lots of files under it.  You can cd into that directory, and repeat the command.  Eventually you may find something you can delete to reduce your file count below your quota.</div>

There are (at least) two ways to access your ACMS </div>

• ssh connections
• vncgnome connections
• Secure file transfer with scp (secure copy) or sftp (secure file transfer protocol)

Using ssh on Mac on Linux (for terminal commands only—for graphics, see below)

From Mac or Linux, using ssh is easy, because it is likely already installed.  Just go to a terminal prompt and type:</div>

ssh spis15xx@ieng6-240.ucsd.edu</div>

This should bring up a terminal session on your SPIS ACMS account.  This is fine as long as everything you are doing is at the command line.  </div>

Use exit or logout when you are finished with your session:</div>

[spis15t7@ieng6-240]:~:501$exit logout Connection to ieng6-240.ucsd.edu closed. Phills-MacBook-Pro: pconrad$


Using ssh on Windows (terminal commands only—for graphics, see below)

On Windows, you need a Secure Shell Client.  One example of such a program is PuTTY.  PuTTY has the advantage of being free, widely used.</div>

When you try to connect, you’ll see the following dialog box:</div>

• For the Host Name (or IP address) field, enter ieng6-240.ucsd.edu
• If you want to "save the session", you can enter a name such as "ACMS" in the "Saved Sessions" box and click save.
• Click and "saved session" and click "Load" to connect then "Open" to connect.

</div>

Using ssh with graphics—The no $DISPLAY environment variable problem If you try to access programs that brings up windows or graphics (such as idle), though, there will be a problem. You’ll get a message like this one:</div> [spis15t7@ieng6-240]:~:501$ idle
Traceback (most recent call last):
File "/software/common/python-2.7.10/bin/idle", line 5, in <module>
main()
File "/software/common/python-2.7.10/lib/python2.7/idlelib/PyShell.py", line 1542, in main
root = Tk(className="Idle")
File "/software/common/python-2.7.10/lib/python2.7/lib-tk/Tkinter.py", line 1814, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable [spis15t7@ieng6-240]:~:501$


ssh with graphics on Linux

On Linux, you can probably fix this by simply including the -X flag when you use SSH (you’ll have to exit and login again):</div>

type:</div>

ssh -X spis15xx@ieng6-240.ucsd.edu</div>

Then graphics programs should work.</div>

ssh with graphics on Mac

On Mac, you’ll need to install an X11 server on your Mac, such as XQuartz, (free download, here): http://xquartz.macosforge.org/landing/</div>

Then, the Linux solution above should work for you.</div>

ssh with graphics on Windows

For Windows, you’ll need an X11 server on your Windows machine, such as XMing.</div>

Installing and Configuring it to run with PuTTY is a bit technical.  Here is one explanation:</div>

Some Unix Commands

Note: that “directory” is the Unix word for what is more commonly called a “folder” these days on systems such as Windows and Mac OS.

Stuff in italics is not literally part of the command—it’s standing in for an example of what might go there.

 ls list files ls -al "long" list of "all" files, including hidden files pwd print working directory (what directory am I in?) cd someDir change working directory into someDir (assumes someDir is name of a directory/folder inside my current working directory) cd change working directory to my home directory cat filename list contents of file with name filename   (concatates file to standard output) more filename list contents of file, but allow me to see one screen at a time, pressing enter or space bar to see "more". rm filename remove (delete) filename mv oldname newname rename file from oldname to newname (in the current directory)  (mv stands for move, but also is the rename command in Linux) mv filename .. mv (move) file from current directory to one directory "up" (..) mv filename dirname mv (move) file down into dirname (assumes dirname names a directory under the current working directory) cp filename1 filename2 copy filename1 to a new file called filename2 cat > filename  line of input  more input  ...  CTRL/D to end create a new file called filename  (concatenate standard input into file) quota -vs show current file quota du -sh * show summary of current disk usage (in human readable units) for each file/folder in current directory (not including hidden files) du -sh .[A-z]* show summary of current disk usage (in human readable units)  for each file/folder in current directory for hidden files that start with any character between capital A and lowercase z.)