• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help (Solaris)  RSS feed

 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a command to monitor file usage to get the number of users hitting our files daily. It was suggested that we use lsof, but we're either not getting it right or it's not the right tool. Any ideas? Grateful for the help. Thanks.

Pat
 
sun ram
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't thing you can get this information using lsof command. lsof command will give currently openned files list. It will not give file access history information.

Also I don't know any commands for this.

-SR
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is NOT a help when you tell me what you think DOESN'T work and then proceed to tell me that you haven't a clue. This is one of those cases where it is better to let people think you're smart and keep quiet.

I've tried lsof and fuser in the hopes that something can track who is using the files. Since Solaris Resource Manager does have the ability to track files, but the techs won't let us use it for that because of system resources, I will try the Perl forum instead.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are telling that you're trying 'lsof' and not getting it right, and telling, it might be the wrong tool - and sun ram tells you it's the wrong tool -
- should we let you fiddle around with 'lsof'?

Well: 'lsof' IS the right tool - you're just not getting it. RTFM. man lsof.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Listen cowboys: please don't get your chaps all twisted in a knot over this.

Pat: I've deleted the other thread you started to complain about this one. We don't cotton to that sort of thing here.

Stefan: I've warned you to "be nice" in the past. Remember, it's not just a good idea, it's the law 'round these parts.

Pat, again: I understand it's frustrating to not get good answers to your queries. That happens, sometimes. Remember that nobody 'round here gets paid to answer questions. We do it because we want to help people.

Now, I think the main problems I see here are that first, your question is pretty vague, and second, you asked it in a forum that's more dedicated to running Java on Linux than it is to any kind of hardcore Solaris filesystem accounting questions.

Personally, I think lsof could indeed be the solution; but you'd have to run lsof from a big old hairy Perl script to parse out the info you want and do the reporting. Maybe such a script exists, somewhere; and maybe there's a better approach overall. But as I said, your question is quite vague, so it's hard for anybody to know exactly what you need.

Finally, since it sounds like there's an official way to do what you need, your problem is really mainly an organizational one. Maybe you could talk to your boss (who could talk to his boss) about getting them to change their minds. Or maybe the sysadmin guys would gladly do your reporting for you, if you sent them a case number so they could charge their time. Taking the bull by the tail and facing the situation is often the best approach.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I apologize for becoming angry. Normally I can blow off someone who's being snide or ridiculous, but I absolutely can't stand the RTFM response. I'm a SAS guru and I get very upset when someone responds that way to a newbie. (I can always spot a faux-expert by that response, btw). Sometimes the manual is about as clear as mud and doesn't offer a clean example, so I will explain.

Thanks for the response. I didn't realize I was being vague, nor did I realize that this area was for Java since it just says Linux/UNIX. A Perl script doesn't bother me. But it occurred to me that there may be something similar to the mainframe:

On the mainframe, you can set up RACF to notify you if a file has been accessed. Is there possibly something similar in UNIX that you know of?

Thanks for your time.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well - sorry Pat, for the wrong direction.

It was meant ironically - I don't think lsof is the right tool - at least not on linux - if you don't let it run in an endless-loop.

I allways took this as Unix/Linux-forum, not only 'Java and Unix/Linux'-forum.
And the question isn't vague - in my opinion.

Ernst: how long do you remember an rule-stretching-post? Isn't 6 months enough?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!