Sysadmin Mega Thread

I spent 4 hours building a fucking query for the business team to do some analytics.

I get it working perfectly and one guy jumps on slack, on his phone, assuming that the query doesn’t work and will return duplicates, by UUID.

I tried to explain the query to him. He didn’t understand. I offered to hop on a call and explain it. He wasn’t available.

Finally, I just gpg’d the results over, told him to look at this:

cat Result.csv  | cut -d \, -f 1 | uniq -d

I’ve knocked over every conditional and he just says “it’s still not right”

How the fuck is it not right? Because I used subqueries the way he doesn’t like? I returned the right data. I didn’t lock the database. I didn’t knock it over trying to process half a billion records.

time to let my anger out on the iron

4 Likes

Iirc, uniq only works on sorted lists?

1 Like

Ahhha, SQL queries.

Do you ever get that one guy who writes huge sequential queries? Because your database is on ridiculous NVMe storage and it can stream sequential scans at 6 GB/s and they’re all like, “What!? It doesn’t matter, it runs fast like it is.”

1 Like

the list is sorted by postgres.

But yes.

Either way:

cat Result.csv  | cut -d \, -f 1  | sort | uniq -d

Gave the same reults.

yay unix!


We don’t have super complex databases, so no.

But that would probably be me.

Just thicccccc row counts.

1 Like

select * always!

its much easier than typing out all those field names and who knows, you might need something later in the line of SQL you’re writing :rofl:

1 Like

If any of you smart sysadmins have insight here, I’d appreciate it…

Trolling for protips -

Does anyone have suggestions or documentation for creating a SLES15 template in VMWare?

cotton

So, one thing I tried for the first time today that works (as it should, but neat).

Mixing Powershell and Unix CLI tools (on my Mac, but linux too)

e.g.,

PS /Users/jrose> get-vm  | select name,notes | ft | grep -i radius
per-w2k12-17                        Windows 2012R2 virtual machine for NPS (Radius)
per-w2k12-7                         Windows 2012R2 virtual machine for NPS (Radius)
PS /Users/jrose> 

nice, if you get a table you want and then just want to filter it for example :smiley:

Obviously grep works on the TEXT output of powershell and not on the object pipeline, but that’s fine sometimes :slight_smile:

Accidentally got a barebones server on ebay that’s incompatible with the E5v2 CPUs I already had to put in it, so now I’m getting E5v3 CPUs too.
Sadly also incompatible with the 80GB of DDR3 reg ECC I ordered to go with the 16GB I already have, so now I’m getting 128GB DDR4 reg ECC and that really hurts. :expressionless:
Anyone need some DDR3 server memory T_T

1 Like

GitLab 13.0 is going to ship May 22nd and is going to be an exciting release. One of the main features I am excited about is the security scanning like how GitHub does it.

Kickoff Review

Breaking Changes

2 Likes

I’ve had luck buying directly from Unix Surplus. If they’re not too busy, they’ll spec something custom for you and they readily have compatibility info on their units.

Well it was my fault for assuming compatibility with v3 implied compat with v2. I did check unixsurplus but didn’t see what I was looking for anyway. Not that I ended up getting what I was looking for. But I’m ending up with something better so I can’t complain too much.

1 Like

Sure, if the extra expense was nbd, then party on I guess.

So.

New thing I’m working on:

@freqlabs I’ve got a small problem that you might be able to help with, hopefully?

I’m writing out a status line, and writing over it by using \r and just printing the line before. The problem is that when I do that, if the previous line is longer than the next, I get dangling characters. Now, you can just throw a bunch of spaces on the end to clean it up, but that’s a bit hacky. Is there a way to clear the entire line that can be invoked similarly to \r? I’m using python if it helps.

A bunch of spaces (counting would be less hacky).
Or start getting complicated with curses but that’s a pain.

Or ansi sequences… “\033[2K” clears the line (not sure if that’s the correct encoding for Python).
Yep that’s right

>>> print("hello\r\033[2Kfoo")
foo
3 Likes

sup party people, how does one

monitor their gpu

utilization in linux?.. cli will do just fine

plz just need quick resp

It’s going to depend on the GPU. For Nvidia with the proprietary driver, use nvidia-smi. It can give output in formats which can be parsed by other tools.

woot!

Thanks dude! I knew you were the guy to ask. :smiley:

1 Like

that sucks

how can you game on linux if you cant monitor your damn gpu

Hey drunk, you should make a thread for this. It’s not really sysadmin stuff (I mean, it kinda is but gaming isn’t).

That said, there are a lot of smart people in here who might be able and willing to help you so feel free to drop a link to the thread here.

2 Likes