Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: A (highly) "ethical" use for for Perl

by blazar (Canon)
on Dec 23, 2004 at 12:33 UTC ( [id://417066]=note: print w/replies, xml ) Need Help??


in reply to Re: A (highly) "ethical" use for for Perl
in thread A (highly) "ethical" use for for Perl

If it's cool to you then it is CUFP. That's just the way art is. Some like it, some don't.
TY! I hope that more people would have got the irony behind this thing...
Why did you choose to fork instead of maybe trying to nice down his processes as low as possible? You
That's more or less a long story, so I'll tell you one of those anecdotes I've avoided up until now... this guy at times is running some numerical simulation programs of his own. So every now and again you do log on a machine and notice that it is particularly slow. You launch 'top' and you notice an 'a.out' of his own taking as high as 98% of the CPU. He often does this on more than half of the most performant machines at a time.

By the end of August he's been noticed running one of these simulations on the server!! At this point a friend of mine who happens to be one of the sysadmins too wrote him an email kindly (no sarcasm intended this time: he's really a pleasant and kind person!) asking him to stop doing so and use one of the clients instead. And he didn't get any answer...

Exactly one month later I was running a somewhat CPU intensive program of my own ("of course" it was in perl and it was... ehm for a JAPH, see Re^2: My 1st post (japh) for more info). I would like to stress that I had carefully made sure that (i) no more than one instance of it could ever run on each node, (ii) it was launched with nice 18, (iii) it correctly trapped signals to be stopped at any time if needed.

I must say that a few users noticed my process running in the background, and indeed one of them asked me (in other words, but the sense was this) if I were stealing computing power away from him. I gently explained him that at nice 18 I was only using a small fraction of the CPU's resources and that he could run all of the programs he liked. I must admit that I was slightly disappointed by receiving his mail, but all in all he was honest and smart enough to accept my answer. Also, he was sensible enough to talk me face to face.

At this point do you guess what happened? The other guy answered the mail he had not answered for a month. This is what he wrote, in his typical attitude (that I can only partly translate into English, the original text is Italian):

I didn't know that *** was the server, it seemed to be only virgin land where to run my processes. I'll set out for foreign's country.

What do you think, instead, about imposing some rules to limit savage running on part of some users (like *** -Note: that's my username- who currently occupies almost all of the good machines (*** -Note: snip list-) with processes that often last for weeks.

I'm not saying that if everybody were just as reckless (even if I'm noticing as a pleasant surprise that he has discovered 'nice' since a few days ago) as he his it would be catastrophic, but two of them would be enough.

I snip the rest, but it's along the same lines. Needless to say, the sysadmins solidarized with me, I was sent a copy of this mail and answered him personally, telling him what I thought of him, etc.
could even add that to his .profile or add an if to the system wide profile. Instead of forking you
But I do not have superuser powers (even if I've been a sysadmin here too, in the past). But then even if had them, I really would consider it to be unethical to use them for this sort of personal revenge: I could never ever do anything like that.
could gobble up as much memory as possible then release it on his logout? Or finding their ip address and flooding it with useless udp packets? I ask because
Yes, I could have done something like this too. But this was also an excuse to find a motivation to deepen my knowledge of signal trapping and process management programming techniques.

I want him to log into a machine and see its load get as high as 100, launching top or ps and see more than a hundred processes of mine, all of which, BTW, have the same name as his login...

Yes: this is not really a malicious program, but it is definitely a means of making fun of him! Of course I will remove it after his first angry mail...

slowing the entire machine down would seem to cause you problems as well as him...
Not at all. The one and only possible (but unprobable!) damage for any other user could be a noticeable delay when trying to log into a machine. But as soon as they succeed in logging in (and they do!), the load will decrease rapidly.
Has it ever gotten out of control and overrun your machine? Just wondering :-) Hope your friend doesn't read perlmonks.
Nope, it has never got out of control. Also, he's not my friend. He's an idiot (and an idiot with an attitude too), period. And I couldn't care less if he read this: I already told him what I think of him, and many others did too.
  • Comment on Re^2: A (highly) "ethical" use for for Perl

Replies are listed 'Best First'.
Re^3: A (highly) "ethical" use for for Perl
by elwarren (Priest) on Dec 23, 2004 at 19:52 UTC
    You mention in another post that attempts to login to the server are "bounced" to one of the clients. Not sure how you accomplish this, but it would be interesting to force this guy to one single node no matter where he logs in. With ssh keys setup, you could automatically ssh him to the same server every other node :-) He would login, start his a.out, login to another machine, start his a.out, and would just be competing for cpu against himself.

    I was going to suggest renaming your perl to a.out so that it appeared to be his code, but when I realized your program was named after his login I was ROFL.
      You mention in another post that attempts to login to the server are "bounced" to one of the clients.
      I must confess that while indeed this is more or less what I wrote, it is not strictly true. Indeed users logging from outside are bounced on clients, but they are allowed to log in to the server if they wish so. However most users do not even know what its name is, since for example we have a 'whoall' shell script that shows who's on which machine and it only shows the clients.
      Not sure how you accomplish this, but it would be interesting to force this guy to one single node no matter where he logs in. With ssh keys setup, you could automatically ssh him to the same server every other node :-) He would login, start his a.out, login to another machine, start his a.out, and would just be competing for cpu against himself.
      Well I must admit that all this is actually interesting but, if possible at all, it would require superuser powers, which I currently don't have, but which I wouldn't use anyway for real ethical reasons, if I had them. I have had to argue with him (because without any good reason he's had to argue with me in the first place) as an user, and as a user I've prepared this revenge/joke.

      Also, unless/until we impose well definite rules on computing power consumption, he's not really done anything illegal so nobody was ever fully determined to take measures against him, even if some of the sysadmins have seriously considered removing his account because of his attitude in previous situations.

      BTW: I've noticed from the logfile that it has already "worked": of course I'm waiting for him to complain and then I'll stop it.

      I was going to suggest renaming your perl to a.out so that it appeared to be his code, but when I realized your program was named after his login I was ROFL.
      His code is named a.out only because that's the default executable name created by gcc. It only means he doesn't care giving the -o option, let alone creating a proper Makefile. But if I'm making fun of someone, then I want him/her to know...

      PS:I realize that this has eventually gone totally OT WRT Perl, so I wonder if PM provides some sort of OT area where to move the discussion if anybody is interested.

      PS2:something that I've wanted to write down for quite a while... there's an Italian word, "stronzo", of which I don't know any non vulgar synonim having quite the same expressive power, that best expresses what we all think of this guy: he's the typical idiot who always thinks he's one step ahead of you...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://417066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-19 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found