I am looking for a script that would press "Q" every second when idle for a certain amount of time in an application.
I want to have a script running that presses "q" when I’m idle in "Roblox" so I can watch anime and grind at the same time.
Let’s say the OS is Windows or Linux
As a System Admin, I think the answer to this question is : NO
I always configure end users machine for auto lockout for a given idle session time. Because I’m think, if the user leaves the machine without locking it, I should try something to at least protect my network
What if I did not do that ? Do you think there could be reasonable risk not related to a malicious person taking advantage of an idle session ?
I have PostgreSQL 9.6 and backend on PHP. When I use Persistent connections to PostgreSQL via PDO PHP I have some idle processes. Command
select * from pg_stat_activity; shows me 3 idle process with query column
DEALLOCATE pdo_stmt_0000013e. I understand, that these processes wait new queries, but I not understand why are 3 processes? On other project with PostgreSQL I have 50 the same idle connections. Where this number is defined, why it depends?
I have a ubunutu 20.04 VM running on a KVM server. The KVM server is on an updated ubuntu 20.04 system. The VM is basically an unmodified version that was just downloaded and updated. Added x2go so I can access it from a windows machine. Using the latest x2go version that works just fine on the 16 and 18 versions of ubuntu VMs running on the same KVM server. The window manager I’m running is xfce. The only weird thing I have here is btrfs configured on a second disk (but not being accessed). The root volume is the default ext4 file system as configured during install.
I can connect to the VM via x2go, run a few terminals, commands, etc. Everything seems to run as it should. However, if I leave it alone for a few minutes (I haven’t timed it yet but less than 30) it appears that the window manager has hung. Well, sort of. The keyboard has no effect. Clicking the mouse also has no effect. Moving the mouse over the corner of a terminal window will change the mouse image to the one to allow resizing, but the resizing won’t work. I have to reboot the VM to clear this.
I attempted to run a background script in one of the windows that outputs the date every 30 seconds. That will keep running and scrolling the window even after this failure event. The console brought up on the KVM server directly from the virtual machine manager does not exhibit this behavior.
Tried running x2go on Windows 7 as well as an updated Windows 10 machine with the same results.
I played around with the sshd timeout values with no effect, which is what I expected if the output of the date script above still generated output.
Note that an x2go connection directly to the 20.04 KVM server (not one of the VMs) also exhibits this same behavior.
Interestingly, I also setup a fresh 20.04 VM on a qNAP server. It has a way to bring up a console within a web page for a VM. This also exhibited this same behavior.
As I said, the 16 and 18 versions of ubuntu work fine on the same infrastructure.
Everything seems to point at something with 20.04 but I have a hard time believing the rest of the world would put up with this kind of behavior. No idea what in my environment would cause something like this.
Not sure where else to look. Any ideas? I’d rather not go back to 18.04 but will as needed. This makes it impossible for me to use 20.04.
After I recently said “screw you if you don’t want to support Windows” to pgBadger and instead invented my own query logger and statistics generator for my own use, I have shockingly realized that my “basically idle” system is making about 100 queries PER SECOND, around the clock (or whenever I’m awake, really).
My estimate was maybe one query every couple of seconds or something like that…
Considering that I’m not running any kind of server or even doing any “real work”, it seems like a lot to me. But maybe that’s not even within “test idle range” for you people. Maybe you will say that you’re running thousands or even tens of thousands of queries per second on your machines. And of course it depends on a lot of factors. I’m talking in general, and, if you want the most relevant context, a “life loop” where I do various automated tasks all the time to keep track of stuff. Nothing of “real value” to anyone other than myself.
Most of the queries are simple
UPDATE ones in a basic “key storage” table I use to communicate between scripts and remember less important general “variables”.
97,230 queries logged in the last 48 minutes. No queries take long to run at all and I don’t even have (almost) any indexes set up yet.
Windows 10 doesn’t even seem to register my activities at all in Task Manager, so they must be using minimal system resources or it’s broken or I don’t understand what it measures.
When the joystick servo control is idle (user not moving it) , i don’t believe the axis value will be 0 because there’s a lot of thing that interfere with the value (such as calibration , inaccuracy , physics problem in real life , ect . . ) . Is anybody have tested at which range the joystick servo control axis value is safe to be considered as idle? (both negative and positive) . I’m looking for constants here.
To anyone confused what does i meant with joystick servo control , picture below :
(ps : not my image, i found it on google)
Working on my first project and I’m trying to get enemy movement sorted, the code below is my current implementation. The enemy using the distance between the player position (target.pos.x) and their pos.x. I want my enemies to move around independently and not have to wait for the player to be a certain distance away.
self.target = game.player def movement(self): self.acc = vec(0, BOSS_GRAVITY) if (-17 >= (self.pos.x - self.target.pos.x) >= -200) and self.target.hit_rect.y == self.hit_rect.y: self.vel.x -= ENEMY_SPEED * -1 self.enemy_direction = 'R' if (200 >= (self.pos.x - self.target.pos.x) >= 17) and self.target.hit_rect.y == self.hit_rect.y: self.vel.x += ENEMY_SPEED * -1 self.enemy_direction = 'L'
I want my enemies to move to the right a certain amount then change velocity and go the opposite way not remain idle.
What are you waiting for, boss? Rule your market and be the richest manager! Start with an underdeveloped market, build some products that belong to you, and design your dream market! How can a complete town lack a market? Sell some of the goods that people need through your market, get more…
I’m currently copying large directory tree from an external HDD to to internal storage of my server. The performance of the copy operation is basically quite good, i.e. 35MB/s with the external HDD connected via USB2.
However, I only get this performance for about 30s and then the copy process does not get any CPU time. This means, rsync (and also cp) does not copy any data, does not update its stdout, or react on SIG-TERMs. After about 1 minute, it gets scheduled again and copies with 35MB/s again for 30s, and then nothing again and so forth.
Does anyone know what could happen here or name me any tool how I could investigate what is happening? I already increased the nice value of the rsync process to 19, but this does not change anything. During the idle time of rsync, the whole system is idle (no other IO, no other process that uses the CPU. Basically, the whole system is idle).
During the active times, the rsync process has three threads that switch between ‘running’, ‘uninterruptible sleep, and ‘interruptible sleep’. During the non-active time, all threads are either have an ‘uninterruptible sleep’ or ‘interruptible sleep’ state. Because of this, I think that rsync has to wait for some long-lasting IO operation. But how could I determine what operation takes that much time?
The system is running on a 5.4.34-1-pve linux kernel and the internal storage is a LUKS encrypted ZFS file system on LVM. The LVM sits on top of a mdadm RAID 5.
The command I used to start rsync is: rsync -ah –no-compress –progess
Thanks for any suggestion!