[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Voyeur Cams | Click for more| Home]

Killing abusive tabs

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 3

File: UrAwQoC.jpg (232KB, 3360x2100px) Image search: [iqdb] [SauceNao] [Google]
UrAwQoC.jpg
232KB, 3360x2100px
I guess we've come full circle back to being mainframe admins and kicking abusive users :(

Recently I came to my pc running its fan at high speed and a browser tab maxing the GPU for what I assume to be bitcoin mining.

What is the best way to automatically kill off tabs (or processes for that matter) that push the CPU or GPU for extended amounts of time.

I run linux.
>>
Isn't this the kind of thing an OS is supposed to do FOR YOU?
>>
Note that the crafty fuck was smart to delay running the job so that the user was less likely to notice.
>>
>>51572474
Not necessarily. Some jobs like encoding or compiling have legitimate reason to push the system.

A fucking weabo site does not.
>>
>>51572450
Write a script to check a process having cpu usage >50%, put it on cron, like, every 5 secs... Problem solved.
>>
>>51572513
That's not a reasonable solution. A process, including individual tabs or the browser itself can go over 50% for short periods of time (especially with the js heavy crap web devs like to push).

What I want is something like a browser addon or a daemon that will monitor the tabs and kill anything that runs high on average for a specified period of time.

does something like this exist yet?
>>
>>51572450
If you did this without privilege just do $ ps aux | grep <user>.

Then search your process. If you know its name just do $ killall <process>.

Source : https://panaharjuna.wordpress.com/2009/10/19/kill-process-using-kill-command-under-linuxunix/
>>
>>51572636
>>51572649
This is not stackoverflow

Also your suggestion is useless
>>
File: BPS.jpg (13KB, 275x174px) Image search: [iqdb] [SauceNao] [Google]
BPS.jpg
13KB, 275x174px
>>51572578
maybe customize the script to log the values u get every 5 secs
the revisit these values every "insert time period" and calculate an average.. then decide if this value is bigger than "insert ur threshold value %" if this = true kill the program
>>
>>51572671
Suggesting my comment *may* be useful would imply this website would be too, which is not the case.
>>
>>51572693

Yes. But then I'd have to write it, which I don't want to (hence this post). Also, if you're going that far, might as well use a proper programming language.

Anyway, there will be an issue with false-positives like youtube. I think an addon is the only reasonable way to go. :(
>>
>>51572737
That, or hooking up to the browsers debugging interface, which sounds significantly more interesting,
>>
>>51572450
>>51572513
>>51572693
>>51572737
https://wiki.archlinux.org/index.php/Cgroups
>>
>>51573339
>https://wiki.archlinux.org/index.php/Cgroups

Leaving false-positive issues aside, cgroups does nothing to remedy the original complaint (gpu thieving tab).
Thread posts: 14
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site. This means that 4Archive shows an archive of their content. If you need information for a Poster - contact them.