- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Anamolous behaviour with multiple sessions.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2004 11:20 PM
01-01-2004 11:20 PM
Anamolous behaviour with multiple sessions.
The problem is like this:
I log in one path: /abc/xyz/kkk
Then I try to uninstall all the software present in the workstation including the parent directory itself i.e. /abc/xyz/kkk.I have code whereby I detect presence of this directory path and pop-up messages corresponding to presence or absence of this directory path.
In case only a single user is logged on the in this path(i.e user who is uninstalling the software), behaviour is ok. But in case of two or more users logged in the same path the behaviour is not as expected.The directory structure gets deleted in all the test cases.
Can someone give some explanation of this behaviour.
Thanx in advance,
Regards,
Pankaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2004 12:51 AM
01-02-2004 12:51 AM
Re: Anamolous behaviour with multiple sessions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2004 04:58 AM
01-02-2004 04:58 AM
Re: Anamolous behaviour with multiple sessions.
Why even though a second user can cd /abc/xyz/kkk and you can still remove the software and the directory while someone is in the directory?
___________________________
I think the behavior you are looking for is that the uninstall process would fail to uninstall and also fail to remove the directory b/c of the user in the named directory.
The action you are expecting I think is similar to the umount command where the filesystem is busy. OS functions are smart in HPUX, so as dis-allow you to umount a filesystem in use or where a user is active in it. I dont think the swinstall function allows for a check to see if anyone may be in a directory.
I dont think this is the same as the umount command. Removing software has no such checks to see who or what id is active in a certain directory.
However, with that said, I would expect some complaint that a user is active or something similar.
What happens to the user? Are they disconnected or merely dropped to a lower lvl directory?
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2004 05:53 AM
01-03-2004 05:53 AM
Re: Anamolous behaviour with multiple sessions.
But in case of two or more users logged in the same path the behaviour is not as expected
That means? Are you using rm to uninstall the software, or how do you do it?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2004 07:58 PM
01-04-2004 07:58 PM
Re: Anamolous behaviour with multiple sessions.
Thanx for the prompt answers/suggestions provided.
I am using "rm" to uninstall the software.
In all the scenarios the parent directory from where I run the script gets deleted.
I have a piece of code which is like this:
if [ ! -d /abc/xyz/kkk ];
then
"pop-up error msg"
So when two users are logged in the same directory path, although directory structure has been deleted still this message is being displayed.
With single user logged in and uninstalling the software, the behaviour is ok i.e. this error message is not popped up. I hope the problem is clear now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2004 08:11 PM
01-04-2004 08:11 PM
Re: Anamolous behaviour with multiple sessions.
If multiple users should be able to use it, you must ensure that everything id not duplicated, including directory names.
For example, you can use that directory as a base, but each process MUST use a unique subdirectory, choosen at runtime.
I suggest you to create some code with the $$ buil in variable, that is the PID number, unique as sufciente.
[-d /yourdir ] && "mkdir /yourdir/workset_$$"
And then install from the workset_$$
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 03:25 PM
01-06-2004 03:25 PM
Re: Anamolous behaviour with multiple sessions.
I understand that the script is not meant for multi users but I wanted to know the root cause of the problem.
Why is there anamolous behaviour? Is it something internal to Unix or what???
Regards,
Pankaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 08:20 PM
01-06-2004 08:20 PM
Re: Anamolous behaviour with multiple sessions.
I have a piece of code which is like this:
if [ ! -d /abc/xyz/kkk ];
then
"pop-up error msg"
So when two users are logged in the same directory path, although directory structure has been deleted still this message is being displayed.
After you've deleted the directory structure, the message should pop up, because it does not exist anymore. There is however an inconsistency in some shells, which allow you to delete a dir, which is your current one. The best way to avoid this, is of course to run it from somewhere else.
can you check, what I said?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 08:30 PM
01-06-2004 08:30 PM
Re: Anamolous behaviour with multiple sessions.
try using fuser command to see if anything is attached to the directory before using the rm command.
fuser -c /dir_to_delete
:-) John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 08:31 PM
01-06-2004 08:31 PM
Re: Anamolous behaviour with multiple sessions.
While deleting the directory structure, I first go to root / directory and delete the directories.
But the main problem is that the piece of code
if [ ! -d /abc/xyz/kk ]; then
"pop up error msg"
does NOT pop up error msg with single user logged on and uninstalling the software.
However, the same piece of code POPS UP error msg with two users logged on.
The behaviour shd be consistent i.e. error msg in both the scenarios or no error msg in both the scenarios.
Regards and Thanx,
Pankaj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 08:35 PM
01-06-2004 08:35 PM
Re: Anamolous behaviour with multiple sessions.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 08:44 PM
01-06-2004 08:44 PM
Re: Anamolous behaviour with multiple sessions.
btw, what shell are you using?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 09:42 PM
01-06-2004 09:42 PM
Re: Anamolous behaviour with multiple sessions.
Running script 2nd time is of no help as by that time all the software has been already uninstalled and directories are removed.
Regards and Thanx
Pankaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 09:49 PM
01-06-2004 09:49 PM
Re: Anamolous behaviour with multiple sessions.
Are the multiple sessions executed at the same time. There might be a chance that the dirs were intact when all the users invoke that script.
If the script throws error the second time it is run then it is along the lines of expected behaviour. Try running the script with user A and after some time with user B.
Can you post the script here?
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 10:59 PM
01-06-2004 10:59 PM
Re: Anamolous behaviour with multiple sessions.
uninstall_software
---------------------------------------
function aa()
cd /
rm -rf /abc/xyz/kkk
function bb()
if [ ! -r /abc/xyz/kkk ];
then
echo "popup error msg"
fi
---------------------------------------
#script execution order
bb
aa
These functions are called recursively for a number of software components.
Script is present in the path /abc/xyz/kkk
Now, there are 2 users logged in same path at same time and User 2 executes the script:
User 1:
#cd /abc/xyz/kkk
#ls
uninstall_software
User 2:
#cd /abc/xyz/kkk
#./uninstall_software
So after one user executes the script the script as well as the directory structure is gone. Hence I could not understand how to execute the script again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2004 11:24 PM
01-06-2004 11:24 PM
Re: Anamolous behaviour with multiple sessions.
thanks for posting the script. This makes it a bit clearer.
I have a number of comments.
1. The body of a function must be delimited by {}.
2. When you call a script and a cd is made in this script, you do not actually leave the directory.
3. use rm without -f to see errors.
greetings,
Michael