There are some UNIX/Solaris files that grow over time, /etc/utmp & /etc/wtmp, to name a few. By rebooting those files are purged and rebuilt. The cron routines are restarted.
But isnt possible to create a task to do so once a month,
have any of you tried?
i ask to avaya and they just keep saying the same, for me it's just crazy that an equipment expensive as CMS, you have to do such maintenance. I mean we can restart it but let say once every 6 month instead of monthly as i have to do it. We have a lot of data but still i thing it should be a better way to do this purge
I do not know of away to automate the reboot. But I have never really looked for one. But I have left the system run for long time between reboots with no ill effects. But you are running a risk. I normal just do the reboot on the day that I do the maintenance backup. And I was thinking of the backup message you get when you are pass due.
I use the root cron jobs to do this automatically.
I created a file using vi with a single line with the reboot command:
/usr/sbin/shutdown -y -g0 -i6
To create files using vi you have to be logged in as root.
If you don't know how to use vi editor, look it up online and get familar with it first.
I used chmod to make the file executable:
chmod 775 [filename]
Then I edited the root cron jobs to execute it once a month on the 3rd Thursday of the month at 3:10am which is our scheduled window for reboots:
***AGAIN, If you don't know how to use vi editor, look it up online and get familar with it before you access and change the cron file. You DON'T want to screw this up. Good idea is to copy the file to another file name so you have a backup to replace anything you might screw up.
While logged in as root, execute command "crontab -e" go to the last line of the cron file and enter what you need, mine is:
10 3 15-21 * 4 /[file directory path]/[filename]
10 = minute
3 = hr of day (24hr format)
15-21 = day of the month (ranges are allowed)3rd Thursday will always fall between 15 and 21.
* is month, since I want this to run every month entry is a *
4 = day of the week, the week starts with 0 as Sunday so 4 is Thursday
If you want is as simple as once every month on the 1st at midnight the entry would look like:
0 0 1 * * /[file directory path]/[filename]
Or every 3rd month starting with January would look like:
The file directory path has to be the full path so if you have this in a subdirectory you need the line to include the root directory and all subdirectories. Mine is /appbin/sys_maint/[filename]
Hope this helps.
- Stinney
Quoting only proves you know how to cut and paste.
yes! exactly that is the same thing i told avaya
but they still are saying i have to do it manually
if i dont do it that way
we are not cover by maintenance
i mean, that is just a fullish anwer from AVAYA
i thing it can be done buy schedule, if you dont want to do the reboot, that 's ok
but you can at least purge the temps files from the cms
I think you need them to provide documented reasoning for not covering this with full explaination as to what documented issues it is known to cause.
Rebooting the device isn't an Avaya process, it's a Solaris OS process.
I've written to our Avaya support contact and asked if they would take exception to us using this. Probably asking for trouble. I'll let you know what they say.
- Stinney
Quoting only proves you know how to cut and paste.
I'd be very careful about adding something to a cronjob not understanding vi editor.
The suggestion by PeteBull is all well and good, but what if you make a mistake in your cronjob addition, or you need to remove it later? How do you change it without using vi?
- Stinney
Quoting only proves you know how to cut and paste.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.