- I have a bot machine (controlled via mobile device) which connects to the Server and fetch information from it by method os "ssh, shell script, os commands,sql queries etc" than it feed that information over the internet (private)
- I want to disallow this multiple connection to the server via the bot machine ONLY.. there are other machine which connects to the server which must not be affected
Client A from his mobile acess bot machine (via webpage) than the bot machine connect to server (1st session) now if the process of this connection is 5 minute during this period the bot machine will be creating, quering, deleting, appending, updating etc
in the very mean time of that 5 minute duration (suppose 2min after the 1st session started) Client B from his mobile access bot machine (via webpage) than the bot machine connect to server (2nd session) now it will conflict with the 1st session and create Havoc...
限制
- Now first of all i do not want to editing any setting on the SERVER ANY WHAT SO EVER
- I do not want to edit the webpage/mobile etc
- I already know abt the lock file method of parallel shell script and it is implemented at script level but what abt the OS commands and stuff like that which are not in bash script
我的吼声
平行ssh连接到服务器
没有什么神奇的“操作系统命令和类似的东西”,可以实现你想要做的事情。锁文件似乎是最明显和最简单的事情 – Vorsprung 2014-10-01 08:11:39
因此,简而言之,你是说在SSH会话连接之后检查锁文件?因为它是为了避免并行运行相同的Shell Shell脚本?即使如此,我的下一个问题将是如何判断前一个会话是否被绞死或需要很长时间等等。不知道下一个连接(在挂起的会话之后)将看到锁定文件并且将无法连接到所有连接。 ..如何处理这个问题? – user1486241 2014-10-01 08:30:44
另外你让我错了在限制点三我提到我知道abt锁定方法,并解释它..但我不想在这里使用锁定方法,就像他们在shell脚本..所以我想知道替代方法..当它是一个geniune问题时为什么-1点?还请检查我以前的评论为下一个问题。 – user1486241 2014-10-01 09:27:55