Dear {user},
Thank you for your request for an account on the M&S department compute server. In the URL below is the documentation, please read it carefully and then send me an email to request an account (optionally with your desired username).
https://vankesteren.github.io/server_docs/userdocs
Kind regards,
{your name}
After receiving the formal request for an account, it is time to create the account. We have some nice user-friendly scripts installed on the system to do this (adm stands for admin):
sudo adm user add <username> <password> <emailaddress>
We also have a teams page where we stay in contact, ask questions, and generally keep track of who is doing research with the server. Add the user to the page as well.
Dear {user},
An account has been created for you on the department compute server.
Username: {username} Temporary password: {password}
Please update your password as soon as possible.
If you have any questions, do not hesitate to ask! I have added you to the department computer teams page.
Happy computing!
{your name}
If a user should be an admin, run the following
sudo usermod -aG sudo <username>
Also:
If you want to remove a sudoer, run
# (this is untested, please check that it works)
sudo deluser <username> sudo
Also:
Deleting a user account happens in two steps. First, we may (optionally) back up the user’s home directory
sudo backupuser <username>
then you can use scp to download the compressed archive username.tar.gz in the working directory. Then, delete the file because it is probably huge.
Then, we will properly remove the user
sudo removeuser <username>
This asks for confirmation before doing anything, so don’t worry too much :)
It’s a good idea to regularly check for the usage of the server by different users.
Generally, the command htop is used to check for server usage, processes open by different users, and more. From there, stuck processes can be killed.
sudo htop
To ensure the /data disk is not filled up, you can check the overall usage and per-user usage using the following commands:
df -h /data
sudo du -hs /data/*
If any user is using outrageous amounts of data, tell them to download it via the “Backing up your data” section in the user docs and then delete it.
Some packages in R create a lot of data in the /tmp directory. Since this is on the (small) main boot disk, this can crash out RStudio server (“white screen of death”). To check available space, run
sudo df -h /tmp
To check for particularly big Rtmp folders:
sudo du -hs /tmp/Rtmp*
Then delete a folder using
# example
sudo rm -r /tmp/Rtmp7jVKku
(Nuclear option, do not run while users are running stuff):
sudo find /tmp/Rtmp* -maxdepth 0 | xargs sudo rm -r
Known use-cases that have this problem are:
cmdstanr or brms: these save posterior samples as csv files in an R temp directory. Mitigation through creating a ~/tmp directory, and then setting options(cmdstanr_output_dir = "~/tmp") and using backend = "cmdstanr". Within the simulation, this directory should be emptied regularly.The commandline application rstudio-server is used to manage sessions on the RStudio server, and to manage the availability of the server itself.
Update the R version in the userdocs.