Unsolved
This post is more than 5 years old
3 Posts
0
4958
creating OneFS cron jobs
We'd like to forward the output of df from OneFS to a server that displays a department wide summary (web hits, disk space, etc).
Any problems if I create a crontab job to do this?
(Shell script to extract what I want from df, then curl it to the status monitor server.)
I comfortable doing things like this in *nix, but just want to make sure there are no surprises doing in on OneFS.
Thanks,
Ron
christopher_ime
2K Posts
0
July 19th, 2013 22:00
Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility. Questions written to the users' own "Discussions" space don't get the same amount of attention and questions can go unanswered for a long time.
You can do so by selecting "Move" under ACTIONS along the upper-right. Then search for and select: "Isilon Support Forum" which would be the most relevant for this question.
Raj_la
115 Posts
0
July 23rd, 2013 12:00
i have some sort of similar question , is there any cron job feature is available in onefs like in unix ?
cincystorage
467 Posts
0
July 23rd, 2013 12:00
I just used crontab -e like any *nix style system... just have to make sure to do it on the correct node if you are doing something dependent on the node..
Raj_la
115 Posts
0
July 23rd, 2013 12:00
hi mark,
can u explain how to add entries in cron on isilon. is it same way like crontab -e & crontab -l or edit it with vi of crontab file is onefs ( /etc/crontab ) ?
cincystorage
467 Posts
0
July 23rd, 2013 12:00
I use both cron and at jobs to schedule work on my cluster with no issue.
Raj_la
115 Posts
0
July 23rd, 2013 14:00
if i want to add job for cluster not on individual node then where to add it ?
cincystorage
467 Posts
0
July 23rd, 2013 20:00
you can't, but very few tasks are node specific.. mostly you can run on any or all nodes..
Peter_Sero
1.2K Posts
1
July 24th, 2013 04:00
crontabs work fine over here, too.
A few points to keep in minds:
- of course your jobs will be light-weighted and do no harm to the cluster...
- the crontab might get wiped when installing OneFS updates (even minor ones)
- you can't execute files from /ifs
-- but you can execute scripts as /bin/bash /ifs/path/to/my/script
-- if you put scripts or executables under a node's / or /var: these are small! and may get wiped, too.
- any node would do, but if it goes offline, there is no automated failover to another node (crontab is a basic UNIX thing)
Cheers
Peter
osaddict
110 Posts
0
July 24th, 2013 10:00
If you do have a need to run something on all nodes, you can leverage the very useful isi_for_array command. If you do a --help it will show you all the options. By default is runs the command after it on all nodes.
A simple example is:
vmdatastore-1# isi_for_array ps aux|grep sshd
vmdatastore-5: root 2011 0.0 0.1 32392 4188 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-4: root 2027 0.0 0.1 32392 4088 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-7: root 1992 0.0 0.0 32392 4256 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-6: root 2014 0.0 0.0 32392 4192 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-2: root 2006 0.0 0.1 32392 3900 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-3: root 2029 0.0 0.0 32392 4256 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-1: root 2022 0.0 0.1 32392 4348 ?? Is 14Jul13 0:00.00 /usr/sbin/sshd
vmdatastore-1: root 55208 0.0 0.2 93976 10440 ?? Is 9:58AM 0:00.11 sshd: root@ttyp0
vmdatastore-1: root 55247 0.0 0.0 7960 1356 p0 S+ 9:59AM 0:00.01 grep sshd
vmdatastore-1#
Peter_Sero
1.2K Posts
1
July 25th, 2013 00:00
isi_for_array is a great tool, but I wouldn't use it inside a cron job.
You would need to deal with (rare, but possible) node outages,
stuck remote jobs, whatever.
I'd rather use isi_for_array to maintain consistent crontabs
on the nodes, and let each node work on its own behalf.
-- Peter