npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

autohpss

v1.1.4

Published

A simple, straightforward way to archive and restore stuff to/from HPSS(SDA).

Downloads

8

Readme

Automated HPSS archive / retrieval system

A simple, straightforward way to archive and restore stuff to/from HPSS(SDA).

Prerequisite

This system assumes you have HPSS(SDA) account.. If not, create it at

https://access.iu.edu/Accounts

Undergraduate needs a faculty sponsor (see https://kb.iu.edu/d/aczn). If you are eligible but not seeing SDA account listed, please send email to [email protected] and ask them to give you access to SDA.

autohpss uses kerberos token to access HSI. If you don't know what it is, simply use kktgen command to setup your keytab.

$ module load nodejs
$ kktgen
IU username: hayashis
IU password: 
Keytab successfully created.

Loading autohpss

autohpss is currently installed on Karst and BigRed2 as nodejs/npm module.

$ module load nodejs hpss

You are now ready to use autohpss commands!

archive

In order to archive your files, directories, navigate to the directory where you want to archive all files and directories under it and run archive.

$ cd /N/dc2/projects/o3d/O3D_STN
$ archive

archive command will recursively walk through a specified directory and find any files that are new, or modified since you previously run this command. It then creates batches of files that are roughtly 30GB in size and transfer them to your SDA account using htar.

autohpss keeps up with list of files in local sqlite3 DB (~/.config/autohpss) along with modified data and which htar archive the files belongs.

You can run archive periodically by setting up a cron job which will 1) ssh to karst 2) run archive at desired interval. Please note that, the arhcive command will re-archive files if they are modified since they were last archived. If you have a files that are frequently modified, you should either not archive those files or archive them less frequently to prevent too many copies of those files to be created in HPSS.

In the future, I will provide a functionality to automatically purge older versions of the same file in HPSS (maybe only keep 3 latest copies?)

You can specify -d to do dry-run of archive to show which files needs to be archived.

You can also specify a Path that you'd like to archive

$ archive /N/dc2/projects/o3d/O3D_STN

Path can be a relative path (it will be automatically resolved to the absolute path)

$ cd /N/dc2/projects/o3d
$ archive O3D_STN

restore

To restore files, simply run restore command with the directory / file path that you'd like to restore.

$ restore /N/dc2/projects/o3d/O3D_STN/derivatives/preprocess/sub-0001

restore command will only restore files that are missing. If archived file already exists, it will skip the file. You are safe to run this command as often as you'd like (like at top of your job script). If the file you have archived is locally modified (with newer timestamp), it will display warning - that you should re-archive those files.

You can specify -d option run a dry run to show which files needs to be restored without actually restoring.

restore in PBS script.

For any workflow that read data from dc2, you should update it so that it will run restore command for each input file/directory that you use in your workflow (restore only files that you actually use!). Be sure to add extra walltime in case files don't exist on dc2 and need to pull from HPSS tape (2-3 hours?)

#!/bin/bash
#PBS -l nodes=1:ppn=16:dc2,walltime=6:00:00
#PBS -N app-dtiinit
#PBS -V 
cd $PBS_O_WORKDIR

module load hpss nodejs
restore /N/dc2/scratch/hayashis/neuro/commondata
restore /N/dc2/scratch/hayashis/neuro/subject_111111
restore /N/dc2/scratch/hayashis/neuro/subject_222222

module load matlab 
module load spm 
module load fsl

... run your applicaiton using data restored above ...

#After successful completion of your job, archive any output files
archive /N/dc2/scratch/hayashis/neuro/derivatives

You could run archive command on your entire project directories, but you should avoid if if you could; archive command will archive all new/modified files under the specified directory recursively.

How can I be sure that my files are properly archived?

After successful archive, you can test to make sure that your files are safely archived by renaming a few files that you have archived, then running restore command on those files to see if the files with original filename re-appears. You can also run diff command betwen the renamed file and files that are restored to be sure that they are identical.