Skip to content

Commit

Permalink
Improve fences with classes and some filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jun 12, 2024
1 parent 7574ae7 commit e3eefb2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions labguide/computing/sherlock/access-and-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ If you are a new member of a lab at stanford, you will need to have your PI emai

Once you have an account set up with your SUNet ID `<username>`, you can access Sherlock via any SSH client client. If you are using a UNIX-like system (e.g., MacOS) and you are using terminal to connect to sherlock, a useful resource is to set up an ssh config file. You can do this by editing or creating the file `~/.ssh/config`, and adding the following lines:

```
```{.default filename="~/.ssh/config"}
Host sherlock
HostName login.sherlock.stanford.edu
User <username>
KexAlgorithms +diffie-hellman-group-exchange-sha1
```

Navigating to terminal, you can login to Sherlock using:
```

```bash
$ ssh sherlock
```

Expand All @@ -32,10 +33,10 @@ Sherlock has fixed allocations for the storage of individuals and groups. As suc

To check your quotas for your group `<groupname>`, you can use the `sh_quota` command:

```
```default
$ sh_quota
+---------------------------------------------------------------------------+
| Disk usage for user <username> (group: <groupname>) |
| Disk usage for user <username> (group: <groupname>) |
+---------------------------------------------------------------------------+
| Filesystem | volume / limit | inodes / limit |
+---------------------------------------------------------------------------+
Expand All @@ -51,13 +52,13 @@ When your home directory begins to get filled, it may be valuable to consider mo

Another useful tool is the disk usage command `du`. A useful and more interacrtive version of this command is `ncdu`. To use `ncdu`, add the following line to the bottom of your `~/.bash_profile`, which will load the `ncdu` module each time you log in to Sherlock:

```
ml system ncdu
```bash
$ ml system ncdu
```

Next, re log-in and access the `ncdu` command:

```
```bash
$ ncdu <folder>
```

Expand All @@ -70,7 +71,7 @@ which will launch an interactive window for monitoring directory sizes from the
Some data resources cannot be shared across the lab and instead need to be restricted to lab members with Data Usage Agreement (DUA) access.
The following can be adapted to restrict ACLs (access control list) to only the appropriate subset of lab members:

```
```{.bash filename="protect_access.sh"}
#!/bin/bash

echo "Using ACLs to restrict folder access on oak for russpold folders"
Expand All @@ -87,10 +88,10 @@ fi
read -p "Enter the username: " user_name

# set restrictions
echo -e "Setting restrictions for ${user_name} as rxw for folder: /n ${dir_name"
echo -e "Setting restrictions for ${user_name} as rxw for folder: /n ${dir_name}"
setfacl -R -m u:$user_name:rwx $dir_name
setfacl -R -d -m u:$user_name:rwx $dir_name

# rm default permissions for the group -- oak_russpold
setfacl -m d::group:oak_russpold:--- $dir_name
```
```
2 changes: 1 addition & 1 deletion labguide/computing/sherlock/data-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Once the dataset is finalized, it should be moved into the “data” directory.

Once a dataset has been installed in the data directory, it should be changed to be read-only for owner and group, using the following commands:

```
```bash
find <directory name> -type d -exec chmod 550
find <directory name> -type f -exec chmod 440
```
Expand Down
4 changes: 2 additions & 2 deletions labguide/computing/sherlock/job-submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Those should be submitted to the scheduler which will dispatch them on compute n

You can check available resources with the `sh_part` command:

```
```default
$ sh_part
QUEUE STA FREE TOTAL FREE TOTAL RESORC OTHER MAXJOBTIME CORES NODE GRES
PARTITION TUS CORES CORES NODES NODES PENDNG PENDNG DAY-HR:MN /NODE MEM-GB (COUNT)
Expand Down Expand Up @@ -103,7 +103,7 @@ Since lab members will often submit many fMRIPrep jobs at the same time, it is b

We provide an example fMRIPrep array job script below for running 5 individual subjects.

```
```{.bash filename="submit_fmriprep_array.sh"}
#!/bin/bash
#
#SBATCH --job-name=fMRIPrep
Expand Down

0 comments on commit e3eefb2

Please sign in to comment.