This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File count monitoring

 
Vernon Mimms
Greenhorn
Posts: 1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fellow developers,
Several failed attempts have made me very unsure of myself and I need your advise and expertise. I'll be as brief as possible.
I have banks of servers set up in 4 different configurations. I must be able to select one or more of these servers and ask them for the file count of specific directories every 2-3 seconds. (Could be a few seconds longer if needed) The server names and information for each is read in from a text file. The list of directories to monitor is also in the text file. This monitoring must go on non-stop changing if a different sever is selected. The servers are linux. I have used ProcessBuilder to build commands to retrieve the file counts and updated the counts with the return. While this is a heave way to go is works and I may go back to it. I have tried to open sockets to selected servers and request file_count from each server and have it return counts but the sockets have proven a nightmare. When they work it is great but they stop for no reason I can determine and have been very hard to work with for my complicated tasks. File counts are not the only thing I need to interact with the servers. I send many different requests to the servers like copy files (thousands of files), move files, edit files, generate reports and statistics. It all seems to break down with the constant file counting. If anyone has any good advise I would love to hear it.
Thanks,
vmimmsiv
 
Winston Gutkowski
Bartender
Pie
Posts: 10232
58
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vernon Mimms wrote:It all seems to break down with the constant file counting. If anyone has any good advise I would love to hear it.

Well,

1. This sounds like an admin function to me. Have you asked one of your friendly sysadmins if they have anything that might help (and that they're prepared to let you use )?
2. Whatever you're doing, all this counting sounds incredibly "busy" to me. Have you looked at alternatives, like notifiers; or is this something you've simply been "told to do"?
3. Have you looked at the WatchService API?

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic