[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Killing abusive tabs
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 14
Thread images: 3
File: UrAwQoC.jpg (232 KB, 3360x2100) Image search: [Google]
UrAwQoC.jpg
232 KB, 3360x2100
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 (13 KB, 275x174) Image search: [Google]
BPS.jpg
13 KB, 275x174
>>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. :(
>>
File: tumblr_meu69yUocD1rwjzpqo1_500.gif (115 KB, 499x272) Image search: [Google]
tumblr_meu69yUocD1rwjzpqo1_500.gif
115 KB, 499x272
>>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 replies: 14
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.