Start a Conversation

Unsolved

This post is more than 5 years old

1995

April 26th, 2012 22:00

Multiple instances of nsrck

File this one under idle (and dangerous) curiousity.

I was at a client site, doing a Networker 7.6.x migration to a new server using the same hostname as before. It went smoothly enough. As we're sitting there, waiting for the nsrck -L7 towards the end (which can seem interminable), he looks over and asks one of those "out of the blue" questions.

"Can we run multiple threads or multiple instances of nsrck?"

I thought about it for a second, and said "well, no, not as far as I know. Nsrck creates a lock file when it runs."

"Aha," says the client, with that gleam of 'let's gain a point on the EMCIE' in his eye, "But the documentation says:

/nsr/index/ clientname /db6/nsrck.lck

              nsrck locks this file thereby insuring that  only  one  copy  of

              nsrck is checking a client's index."

"Therefore, if its just a lock on checking that client's index, I could have multiple versions of nsrck running against other clients, right?"

By this point the "bad idea!" alarms were going off in my head, but I couldn't think of a good technical reason to say no. I'm a firm believer in doing things as the procedure generator says, so we left it as is (and I sure as heck wasn't going to try it on a production system). I'm going to see if I can make it work in the lab, but has anyone else ever tried this? Did it explode? Are there any ways around the single-threaded limitation on nsrck at all?

544 Posts

April 26th, 2012 23:00

Hi Brendan,

As far as i know that you can run multiple instances of the nsrck program concurrently by running nsrck clientname, so each one is instance. which means this process converts multiple client file indexes in parallel and for that each nsrck instance is locking the nsrck.lck for the client it runs on it , meaning you cannot run multiple instance of nsrck on the same client, but you can run multiple nsrck instance on different clients at the same time in parallel. For that it confuses your customer

As i said before this is what i know , may others here have another information that may helps you more.

Thanks,

Ahmed Bahaa

April 27th, 2012 02:00

My understanding is that it creates the lock file to prevent two processes trying to change the index simultaneously which can lead to corruption.  If you try to run nsrck against an index it may wait for lock file to remove or give an error message.  The lock file is only applied to a specific client's index directory so there should be no reason why you could not run simultaneous nsrck processes if they are running against different clients.

15 Posts

April 27th, 2012 07:00

That's kind of what I thought, but it's best to get this sort of thing confirmed. Thanks guys!

15 Posts

April 28th, 2012 10:00

We ended up trying it, and it worked out ok! We wrote a quick script to spawn ten instances of nsrck -L7 (specifying from a list of clients), and rotate through when one process finished. It took a bit of tweaking, as if you spawn all at once, you get RAP errors, however, it certainly cut down on the amount of time to troll through the client list after the migration.

544 Posts

April 28th, 2012 13:00

Thanks Brendan for that information confirmation by testing

Thanks,

Ahmed Bahaa

No Events found!

Top