Updating serverdb file


Question:  There can be cases where you want to want to make a copy of the serverdb file to migrate the qmgr settings from one machine to another, or you could have a problem that resulted in the corruption of your serverdb.  In these cases it's important to know which fields will remain static and which ones need to be updated. 

 

Answer:  The majority of the fields in the serverdb file you would want to leave alone if you were migrating to a new server or trying to re-create a corrupt file.  There are some fields with constantly changing values.  The 'numjobs' field is a counter of how many jobs have been submitted, but this isn't used in any statistical reports and can be safely left blank or set to 0 to have it reset the counter. 

 

The two changing fields with the biggest impact are 'nextjobid' and 'next_job_number'.  These control the job id of the next job that is submitted.  If you have this reset to a number that will cause jobs to have the same job id it could cause problems when trying to find out details of when and where a job ran.  If your file becomes corrupt and you don't know what these values should be you can look at the job files you have in /var/spool/torque/server_priv/jobs and /var/spool/torque/server_priv/arrays, identify the one with the largest job id add some to that job id and enter that value for those fields.  The amount you add will depend on the number of jobs you typically see on your system.  If you typically have thousands of jobs submitted per hour and the time stamp on the oldest job is from 10 minutes ago then you might add a few hundred to the last job id.  If you have fewer jobs submitted on average and the time stamp is pretty recent then you might only add 10 to the last job id you see.   If you'd like to be more precise and not have any gaps in job ids you can also look for the last job id to appear in the pbs_server logs (/var/spool/torque/server_logs/<yyyymmdd>) and add 1 to that value.

 

If you're migrating the settings to a new server the more important thing would be to update the hostname of any entries you have in the managers and operators fields.  If you replace the old hostname with the new then your users will be able to update these settings through the nomral chanels on the new system.

Tags: corrupt, migrate, move, pbs_server, qmgr, serverdb, settings, torque
Last update:
2017-05-02 23:14
Author:
Ben Roberts
Revision:
1.2
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags