Hi all,
I have following setup. One Linux server (192.168.0) catering to various windoze/Linux clients. DHCP is handling the leases. I want to find out which all machines are in the network(alive) at any given point of time. Also, I may have another sub-network(s) and a router.
Is there a reliable and efficient way to get "all" those machines (IP) that are there?
Please help.
Thanks in advance.
On Thu, 17 Apr 2003, Amit Redij wrote:
Is there a reliable and efficient way to get "all" those machines (IP) that are there?
do a broadcast ping for about 1 second and then do arp.
Philip
On 17/04/03 11:53 +0530, Amit Redij wrote:
I have following setup. One Linux server (192.168.0) catering to various windoze/Linux clients. DHCP is handling the leases. I want to find out which all machines are in the network(alive) at any given point of time. Also, I may have another sub-network(s) and a router. Is there a reliable and efficient way to get "all" those machines (IP) that are there?
man nmap.
Devdas Bhagat
Hi,
Thanks for the info. It is working.
But broadcast ping and arp didnt work.
Thanks again.
On Thursday 17 April 2003 01:00 pm, Devdas Bhagat wrote:
On 17/04/03 11:53 +0530, Amit Redij wrote:
I have following setup. One Linux server (192.168.0) catering to various windoze/Linux clients. DHCP is handling the leases. I want to find out which all machines are in the network(alive) at any given point of time. Also, I may have another sub-network(s) and a router. Is there a reliable and efficient way to get "all" those machines (IP) that are there?
man nmap.
Devdas Bhagat
Hello,
I am facing a problem with file locking.
I have process A & process B, writing & reading a plain text data file respectively. I can implement exclusive lock using fcntl() so that when A is in the process of writing the file, B should not read at that instance.
However, I noticed that even if process A has got an exclusive lock on the file, I can open the file manually (say vi) and modify the file.
I tried searching on the net and found an article at http://www.security.nnov.ru/advisories/filelock.asp which says Unix/linux has this problem.
Can someone help me plz?
thanks a lot.
regards, Amit Redij
In a world without fences and walls, who needs windows and gates?
Amit Redij wrote:
I have process A & process B, writing & reading a plain text data file respectively. I can implement exclusive lock using fcntl() so that when A is in the process of writing the file, B should not read at that instance.
However, I noticed that even if process A has got an exclusive lock on the file, I can open the file manually (say vi) and modify the file.
fcntl gives you _discretionary_ locking. Both process A and process B need to cooperate on the use of locks. So, if you're able to open (and write, though you haven't menioned this) the file, it's probably because vi isn't checking for the lock.
See also flock (which has different semantics than fcntl) and search for unix/linux file locking mechanisms on google.
-Manish