Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uniVerse db, cpio (backup) & users 2

Status
Not open for further replies.

mradmin

Technical User
Mar 20, 2001
82
US
Hi, I have 30-40 users logged in (terminals on serial ports) running applications (uniVerse BASIC) on the database. Is anyone familiar with this type of system? My problems include: I do a daily (after-hours) cpio to tape of the company's data files. Before I do that, I issue "who -u" so I can "kill -9" whoever is still logged in. The users NEVER get to a system prompt, so the system doesn't do an inactivity logout. I've heard advisories against using "kill -9" in a script, but I'd like to automate this process. questions: A) if a user was still logged in (but inactive), could that corrupt my backup? B) can a crontab file supply input to a screen prompt (If I start uniVerse by "uv", there is a "LOGIN" paragraph that prompts for terminal type and if no answer, it waits...) C) is there a different tool I should use for backup (and why).
This was a Prime INFORMATION system originally, which was rehosted onto new hardware, and these are a few left-overs that only affect me (the sys.admin). I'm concerned about error possiblities of manual processes, as well as scheduling when I'm out of town (I'm an "army of one" support staff). Thanks in advance ---Will
 
Hi
U ca use TMOUT environment variable to cause
those users who are inactive for long period of time
to logout automatically.
As far as backup is concerned i think that
open files can not be backed up successfully
so it is always a good idea to shutdown database
before backup.
Absi
 
Thanks for your prompt answer, but I'm hoping to find someone familiar with my environment for this exact reason; the environment variable you mentioned doesn't work here. Once the user logs in, they are at a menu prompt (a uniVerse BASIC program) and so the system can't tell that they're inactive from the ksh point of view. "who -u" tells me time since last activity, but tmout only seems to work if the user goes to some "system" prompt (like "#") and I don't allow that.
 
We have a very similar set-up. We have a an RS/6000 with AIX 4.3.3 and uniVerse 9.5.something. We run a nightly cpio backup. (By the way, be sure you also do a mksysb every so often - esp. after system changes - I've been bitten by that one - ouch!) Anyway, the cpio backup works great. We have had to restore selective file on a number of occasions with no problems. You can't do selective record restores (as you can with some PICK type systems) but you can restore the whole file to another spot and then pick off the records you want. The cpio backup will backup files even if there are uniVerse record locks with no problem.

But, back to your problem. What I do is strongly encourage users to logout at the end of every day. Even if they are still logged on at the time of the backup, it is generally not a problem. The files still get backed up. The only problem I have encountered is when a user leaves themselves at a spot where there are half updated files AND we have to restore those files (very very rare). An example might be an Order header exists but no Order detail. If you had to restore, uniVerse system integrity would be maintained, but your application might be a little confused (or a lot confused, good PICK programming limits this confusion).

Now, to your kill -9 question. This is VERY dangerous! You can compromise your uniVerse system integrity! A better way is, from the uv account, at TCL issue the LO -pid (you can get the pid from a PORT.STATUS command). This maintains uniVerse system integrity - BUT the same problem with half updated files may occur - and you would have been the one to have caused it! Again, PORT.STATUS gives you some indication as to what program a user is running and where they are in the program.

Although I DON'T recommend you do this, you can set up a cron job that will do the LO -pid's for you. The first thing you need to do is not do the normal login stuff for phantom's. Our uv VOC LOGIN looks like this:

>ED VOC LOGIN
4 lines long.
----: P
0001: Paragraph
0002: IF @TTY = 'phantom' THEN GO END.OF.LOGIN
0003: MOTIF SYSADM.MENU
0004: END.OF.LOGIN:
Bottom at line 4.
----: EX
>

The next thing you would need to do is write a uniVerse program that EXECUTES the PORT.STATUS command and puts the contents in a variable. Scan through the variable and LO each process you want to.

Then run this program via cron. The way we launch our backup via cron is:

0 23 * * * cd /home/uv ; exec /home/uv/bin/uv "PHANTOM BACKUP.NOW"

The reason I use PHANTOM is that the output goes to the &PH& file in the uv account. I get a log of the output and can check for errors if need be. If you add a uniVerse command to the end of the uv command, no login stuff takes place. A useful and little known feature.

I hope this helps.
 
Thank you very much for your helpful comments. My environment is also AIX 4.3.3 and uniVerse 9.5.1. I do have some added questions, if you have some time...

If I try (your suggestion) the "LO -pid#" as you wrote it, the system tells me that it's "Unable to send signal to process. [ESRCH] No such process". That's what the response is using the pid# from PORT.STATUS for any username other that mine. If I plug in the value that the system shows from "who -u" (at the AIX command level) it works! Is this correct and won't I still have the same potential problems?

Do you have an opinion on the best way to get "up to speed" as an AIX admin? I have been the on-site admin for a couple of Prime minis and for a small WinNT-based network for years. I have a couple of AIX books as well as IBM's docs, but I'm trying to evaluate (for the management I report to) various other training options (IBM classes, CD-ROM, 'distance-learning', and some 3rd-party offerings). Have you seen any of these things and can you offer an opinion? any and all guidance is welcome, thanks

---Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top