--- Log opened Thu Jan 05 00:00:54 2023 |
01:18 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds] |
01:51 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code |
02:02 | | Degi [Degi@Nightstar-tahhft.pool.telefonica.de] has quit [Ping timeout: 121 seconds] |
02:07 | | Degi [Degi@Nightstar-pcteau.pool.telefonica.de] has joined #code |
02:23 | | jessifae [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [[NS] Quit: -a- Connection Timed Out] |
02:23 | | jessifae [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
02:31 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
03:57 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds] |
05:04 | | Netsplit Deepthought.Nightstar.Net <-> Krikkit.Nightstar.Net quits: @PinkFreud |
05:04 | | Netsplit over, joins: @PinkFreud |
05:12 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code |
05:37 | | abudhabi_ [abudhabi@Nightstar-0e4nj6.adsl.tpnet.pl] has joined #code |
05:40 | | abudhabi__ [abudhabi@Nightstar-e3k39r.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
07:05 | | gnolam [lenin@Nightstar-jk02ge.priv.bahnhof.se] has quit [[NS] Quit: Gone] |
09:05 | | Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has joined #code |
09:05 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
09:16 | <@mac> | Mahal: You do Windows sysadmin, right? I need a couple short scripts; I could write them easily in Bash, but I need it in CMD, or failing that Powershell. |
09:16 | <@mac> | Script 1: find every instance of firefox.exe which has '-contentproc' in its arguments and is uing >32MiB of memory, and kill it. Print the list of killed processes, including command line and memory used, and wait for me to hit a key before closing the command window. |
09:17 | <@mac> | Script 2: Same as script 1, except instead of witing for a key and exiting, it loops once per second until I kill it with Ctrl-C (or windows equiv.) |
09:44 | <@mac> | Would you be able to give me any advice? |
09:50 | | mac is now known as macdjord|slep |
10:14 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds] |
10:16 | | jessifae_ [catalyst@Nightstar-95o0ra.dab.02.net] has joined #code |
10:19 | | jessifae [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
11:07 | | jessifae [catalyst@Nightstar-c5sb23.dab.02.net] has joined #code |
11:11 | | jessifae_ [catalyst@Nightstar-95o0ra.dab.02.net] has quit [Ping timeout: 121 seconds] |
11:36 | | jessifae_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
11:39 | | jessifae [catalyst@Nightstar-c5sb23.dab.02.net] has quit [Ping timeout: 121 seconds] |
12:36 | < Mahal> | @mac I'll hit you up in my morning - I can definitely help. Powershell is what you want. |
13:03 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code |
13:28 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds] |
14:17 | | Pinkhair [Pink@Nightstar-dgaf27.ph.cox.net] has joined #code |
14:18 | | mac [macdjord@Nightstar-04p1sk.dsl.bell.ca] has joined #code |
14:18 | | Netsplit Deepthought.Nightstar.Net <-> Krikkit.Nightstar.Net quits: @PinkFreud |
14:18 | | Netsplit Traal.Nightstar.Net <-> Deepthought.Nightstar.Net quits: Alek, @Syloq, @macdjord|slep, Degi, @Kindamoody, @himi, @jeroud, abudhabi_, Pink |
14:19 | | Netsplit over, joins: @PinkFreud |
14:20 | | Kimo|autojoin [Kindamoody@Nightstar-pqh9gl.tbcn.telia.com] has joined #code |
14:20 | | mode/#code [+o Kimo|autojoin] by ChanServ |
14:21 | | mode/#code [+o Syloq] by ChanServ |
14:21 | | Netsplit over, joins: Syloq |
14:21 | | Netsplit over, joins: jeroud |
14:21 | | mode/#code [+ao jeroud jeroud] by ChanServ |
14:22 | | Netsplit over, joins: Alek |
14:23 | | Degi [Degi@Nightstar-nmm.dvo.11.77.IP] has joined #code |
14:24 | | Netsplit over, joins: abudhabi_ |
14:25 | | Netsplit over, joins: himi |
14:25 | | mode/#code [+o himi] by ChanServ |
14:38 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [[NS] Quit: ] |
14:58 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has joined #code |
14:58 | | mode/#code [+o JustBob] by ChanServ |
14:58 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [Connection closed] |
14:58 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has joined #code |
14:58 | | mode/#code [+o JustBob] by ChanServ |
15:01 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
15:01 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:19 | | jessifae [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
15:19 | | jessifae_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed] |
15:24 | | jessifae_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
15:24 | | jessifae [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection reset by peer] |
15:25 | | Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
15:27 | | jessifae [catalyst@Nightstar-c5sb23.dab.02.net] has joined #code |
15:31 | | jessifae_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
16:04 | | jessifae_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
16:06 | | jessifae [catalyst@Nightstar-c5sb23.dab.02.net] has quit [Ping timeout: 121 seconds] |
16:47 | | Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has joined #code |
17:25 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
18:04 | | Kimo|autojoin is now known as Kindamoody |
20:57 | < mac> | Mahal: TY! |
21:40 | < Mahal> | I'll be functional in about 20 minutes I reckon mac |
22:17 | | Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code |
22:34 | < mac> | Mahal: Alas, in 15 minutes, I need to leave for square dance. |
22:34 | < Mahal> | https://www.irccloud.com/pastebin/rUSPO8jR/ |
22:34 | < Mahal> | this'll get you started, then |
22:34 | < Mahal> | (it's option 1; just run it from an open Powershell window) |
22:34 | < Mahal> | (save it as a .ps1 file!) |
22:36 | < mac> | TY! |
22:37 | < Mahal> | https://www.irccloud.com/pastebin/Arbtl7Qz/loopy%20version |
22:37 | < Mahal> | Loopy version is a really shit way - it's just doing until a condition that will never exist happens |
22:38 | < Mahal> | (so you'd have to kill it with ctrl c) |
22:38 | < Mahal> | There are MUCH MUCH better ways |
22:38 | < mac> | Mahal: Loopy version - I don't see a loop delay? |
22:39 | < Mahal> | -whistle- you do not |
22:39 | < Mahal> | you do *now* |
22:39 | < Mahal> | Also, your commandline is never going to fit on the screen |
22:40 | < Mahal> | so now it's wrapped |
22:40 | | Kindamoody is now known as Kindamoody[zZz] |
22:41 | < mac> | If I invoke this *not* from an existing Powershell window, will it close instantly after it finishes like CMD scripts do? |
22:41 | < Mahal> | Yes, because that's the entire point of how Powershell works |
22:41 | < Mahal> | I did point out this is a "get you started" point not a full solution |
22:41 | < mac> | Noted. |
22:42 | < Mahal> | you'd probably have to prompt for user input with read-host or somethign |
22:42 | < mac> | TY! |
22:42 | < Mahal> | (although frankly with the way _I_ usually need powershell if you need user input you're _doing it wrong_, and if you _do_ need user input then just run it from an open powershell window already?) |
22:43 | < mac> | The only user input I actually need is 'let me see what you did before the window closes'. |
22:44 | < Mahal> | then invoke it from an existing powershell window with .\"scriptname" -shrug- |
22:44 | < Mahal> | I mean, you have to run it somehow anyway |
22:46 | < mac> | I don't usually /have/ a powershell window open. This script is supposed to be my 'arg firefox is consuming 98% of my memory again' button. I'm probably going to bind it to an icon on the quick-access toolbar. |
22:47 | < Mahal> | Can vouch (have just tried) if you run this with Powershell (the loop version) it'll stay open |
22:47 | < Mahal> | after all, the loop intentionally has no end conditon :) |
22:48 | < mac> | Thanks again. Now I'm off to dan\ce. |
22:48 | | mac is now known as macdjord|Dance |
22:48 | < Mahal> | You won't be able to link directly to the scrpt; you'll need the shortcut to execute something like "powershell.exe "c:\scriptdir\script.ps1"" |
22:49 | < Mahal> | and probably set the executionpolicy in the shortcut to unrestricted, possibly...? |
22:54 | | Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has quit [Ping timeout: 121 seconds] |
--- Log closed Fri Jan 06 00:00:55 2023 |