> Working on a cluster, I sometimes want to check for the jobs using: > tic, jm=findResource(); toc, > tic, ListJobs=get(jm,'jobs'); toc, > tic, ListJobs, toc, > (Additional tic & toc commands are for evaluation only.) > What I get is a list of jobs, but it seems to take a lot simply to > display that.
Firstly, could I ask which type of cluster you are using? Are you using jobmanager, local, or something else (this has a potentially large effect on the timings - since the jobmanager case, all the information has to be pulled from the remote database; all other cluster types use a collection of files on disk)? Secondly, if you're using R2012a or later, you could use the newer cluster-object based API (starting with 'parcluster' rather than 'findResource'), and I think there are some optimizations in there for certain cases. Finally, could I ask what information you're looking for? There may be ways that you can make a more specific request which could be quicker. For instance, you could find out how many running jobs there are like this: