Skip to main content
Excellent information sir, thank you.

On Wed, Jun 1, 2022 at 4:00 AM Jonathan Smith via Rocket Forum <
Mail@forum.rocketsoftware.com> wrote:

> Kevin, In terms of intervals and how cleanupd works I have covered this in
> several technical presentations in the past. I'd have to check to see...
> Invite your colleagues to join the Rocket Forum and grow our expert
> network.
> ------------------------------
> [image: Rocket Software]
> Rocket U2 | UniVerse & UniData
>
> Post New Message Online
>
> Invite your colleagues to join the Rocket Forum and grow our expert
> network. Share this link.
> Re: Unidata 8.1 [AIX] - Cleanupd and Record Locks
>
> Reply to Group Online
>
> [image: Jonathan Smith]
>
> Jun 1, 2022 5:58 AM
> Jonathan Smith
>
> Kevin,
>
> In terms of intervals and how cleanupd works I have covered this in
> several technical presentations in the past. I'd have to check to see if
> they are still posted on the Rocket sites. Please excuse the length of
> response but this should answer all your questions.
>
> The cleanupd.log in the $UDTBIN directory will tell you the checking
> interval time and by default it's 20 seconds.
>
> # more cleanupd.log
> Starting: Tue May 24 03:50:21 2022
>
> CLEANUPD daemon:
> CLEANUPD checking interval: 20 seconds
> CLEANUPD minimum interval: 10 seconds
> CLEANUPD process id.....: 11665560
> Successfully Started.
>
> The minimum and checking interval are also shown when running showud
>
> showud
> USER PID TIME COMMAND
> root 11665560 0:16 /disk1/ud82/bin/cleanupd -m 10 -t 20
>
>
> The minimum interval and checking interval are set when the cleanupd
> process is started (normally via startud) and the values can be edited
> The lines in startud are as follows
>
> $UDTBIN/cleanupd -m 10 -t 20 > cleanupd.log 2>cleanupd.errlog &
> PID=$!
>
> Starting at UniData 8 on UNIX the method for determining if a process is
> still valid is done by testing the ownership of semaphore (hence why more
> semaphores are required at UniData 8). Each process slot in the lct table
> (whose size is defined by NUSERS) has a semaphore related to it (these are
> now identified as live detection semaphores in ipcstat). When a process get
> it's slot in the lct table (you would see this as the udtno of the process)
> it locks a semaphore. It is the ownership or non-ownership of processes
> noted in the lct table which now determine if a process is active (On
> Windows we use a different method).
>
> Once UniData has identified a process is no longer active any left over
> locks will be released.
>
> So if a lock is taking more than 40 seconds to clear any left over locks
> then you would need to look at what's happening to that process. I have
> seen certain processes take longer to actually exit on AIX than on other
> platforms and this comes down to sockets and keepalive settings on AIX.
>
> Some tools to help you understand the components involved.
>
> !ps
> PID TTY TIME CMD
> 18940104 pts/1 0:00 ps
> 19661004 pts/1 0:00 -ksh
> *19923136 pts/1 0:00 udt (my udt pid)*
> :LISTUSER
>
> Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
>
> ( 32 + 2 ) / 34 1 0 0 0 1
>
> UDTNO USRNBR UID USRNAME USRTYPE TTY TIME DATE
> *1 19923136* 0 root udt pts/1 03:51:32 Jun 01 2022 (Note UDTNO = 1 and
> PID of 19923136)
>
> :!sms -l | more (Note The sms -l command displays the LCT table and my PID
> is the first in list so gets UDTNO 1, sometimes in other tools it will be
> zero but for now it's 1 on the subject we are talking about, -1 notes an
> empty slot)
> -------------------- LCTs (1024) ---------------------
> *19923136* -1 -1 -1 -1
> -1 -1 -1 -1 -1
>
> UniData uses these tables and the ownership of semaphore on Unix (at 8 and
> onwards) to work out if resources need to be cleaned up.
>
> I hope I've provided enough information to help you work out why your
> locks are waiting around. If a process that has terminated left over locks
> are taking more than 40 seconds (two iterations of the cleanupd cycle) then
> this should help you work out why.
>
> Thanks,
> Jonathan
> *Reply to Group Online
> *
> *View Thread
> *
> *Post New Message Online
> *
>
>