Sysadmin Mega Thread

I may or may not do the same thing with client wordpress sites… :shushing_face:

2 Likes

That’s the trick, I dont :rofl:

I should look at the TrueNAS server again… as well as any updates with the other things…

Since you know how to code, maybe consider the automation stuff like Ansible, Chef, Puppet (?) and the like…

1 Like

Ansible has been on my list yeah

You can create an equally-simple CGI script(and do a lot more).
This is of course not static anymore, and has some security considerations(don’t host this publicly), but it’s dead simple:

#!/usr/bin/env bash
set -euo pipefail
#readarray hostArr < /path/to/hosts.list
hostArr=("127.0.0.1" "192.168.0.1" "8.8.8.8")
[ "${REQUEST_METHOD}" = "GET" ]
echo -e "Content-type: text/html\n\n"
echo -e "<h1>Dumb s[::ffff:127.0.0.1]:58536: response:404
for host in "${hostArr[@]}"; do                         [::ffff:127.0.0.1]:58540: response:404
    echo "<pre>$(ping -c1 ${host})</pre>"
done
# bunch of extra info
echo "<h3>uptime</h3><pre>$(uptime -p)</pre>"
echo "<h3>loadavg</h3><pre>$(cat /proc/loadavg)</pre>"
echo "<h3>df -h</h3><pre>$(df -h)</pre>"
echo "<h3>ip a</h3><pre>$(ip a)</pre>"
echo "<h3>ss -lpt</h3><pre>$(ss -lpt)</pre>"
echo "<h3>ps -aux</h3><pre>$(ps -aux)</pre>"
echo "<h3>cpuinfo</h3><pre>$(cat /proc/cpuinfo)</pre>"

See also my devember project, which has an application that does basically exactly this.
I’ve got a cool simple “templating engine” for bash as well: lxc-scripts/template.sh at devember · max1220/lxc-scripts · GitHub
Template this the “mini” monitor script above is based on: lxc-scripts/info.template.html at devember · max1220/lxc-scripts · GitHub
Ironically I’m currently moving away from using separate CGI scripts and templates to using only completely static HTML+CSS+JS, with a single-file “dumb” CGI back-end(command-runner).
A bit of JS never hurt anybody, it’s just when you pile on layer after layer after layer that you eventually get an unperformant mess. “Vanilla” browser JS is actually already very capable.

1 Like

for producing html from shell output, `aha’ may be of interest

example
while true; do echo q| htop |aha --black --line-fix > htop.html; sleep 1; done

I’m sure coloring in ANSI escape sequences to shell scripts we all enjoy even more than formatting html, and it’s even possible to run them in tmux and tee the output to a webpage at the same time.

2 Likes

I know I’m late to this party, but these slimline cat6a cables are great. I don’t want to use anything else ever again. The only flaw is that the protective tab that hovers over the release tab can easily get caught underneath the release tab making it impossible to remove the cable until the tabs are swapped again. Mild annoyance though compared with how insanely thin these cables are compared to normal patch cables, and especially compared to bulk CAT6A.

Now if only they made SFP28 DACs this thin… I guess fiber is that thin, but who runs 1-5 feet of fiber?

I know lawrencesystems always raves about those

1 Like

Do you reterminate these to your desired length? Can these even be reterminated reasonably well enough by us or do we need more specialized tools?

1 Like

Patch cables are never meant to be re-terminated. Of course, you could technically do it, but it most likely would lose the signal integrity that qualifies it as CAT6A. I believe bulk CAT6A is usually of firehose chonk because manual termination inherently introduces much more signal degradation than factory terminations. Probably even worse for patch panels and surface mount boxes.

Anyone know of a good ISO/IMG creator. Looking to have a quick easy way to make virtual .iso/img files.
I have seen PowerISO (looks ok but $40 is kinda pricey)
few other options seem pretty sketch.

https://github.com/iquirino/IsoCreatorToo Maybe this?

I feel like I must be missing something, because practically EVERY freeware CD/DVD burning program out there can master ISO images.

A quick search turned up something even easier:

Emperor forgive for this recommendation, but back then DaemonTools was the best in making these ISOs. IIRC, Starforce DRM could only be bypassed with these kind of copy protection. It was so pirated that they released a lite version specifically for just mounting these.

These days Windows could mount ISOs no problem.

Anyway, the full version of DaemonTools.

1 Like

On a separate note, has anyone here have any experience with Vertiv/Liebert UPS? Is it any good for a rack mounted homelab?

I am planning to get UPS because power fluctuations are apparently bad enough to damage consumer electronics in our home.


The Schneider/APC brand doesnt seem to have an appropriate/compatible product, at least to those available locally.


Cyberpower doesnt seem to have a rackmounted UPS here…

Any other brand I should look into (that isnt a chinese knockoff)?

Now there’s a name I haven’t heard in 10 years.

2 Likes

Yes… That is the brand of UPS that is available here with reasonable compatibility with the local power grid.

I’ve yet to do a deep dive with this and I am not sure if I am getting the complete picture of what I actually need. I will open a new thread for this but right now I am looking for reputable brands.

Also the UPS here at work is of the same brand…

Not looking to mount, looking for a tool to create a .iso file

So take lets say a bios file then convert it to a virtual disk image such as iso or img and then using that file use my avocent unity to pass it to the vm over usb virtual ODD. The KVM only will let you mount .iso or .img

I remember using the shit out of daemon tools. I think I bought a perpetual license from them.

Eaton is the only UPS manufacturer that seems to be trying. All others (I’ve worked with most all of them) do simple float charging of their batteries and scheduled “tests” which just involve blindly switching load over to battery for a few seconds.

Eaton’s ABM* at least doesn’t do that, so your UPS doesn’t drop the load during tests when the batteries are unhealthy. They also make plausible claims that it substantially improves battery lifetimes (which eventually becomes a larger expense than UPS purchase price). But pay attention as not all Eaton UPS units have ABM.

1 Like

In case that’s aimed at me (as well)… Even though they don’t mention it prominently, WinCDEmu provides a context-menu option to “Create ISO image” from any folder:

I’d have hoped my mention of “master[ing] ISO images” would have been a strong enough hint that I’m not entirely spouting nonsense.

The fact that they don’t mention it prominently only further emphasizes my point that there’s thousands of free and easy ways to do so, to the point it doesn’t really warrant a mention. I’d probably be inclined to download a copy of mkisofs and edit the registry to add a folder context menu item for it.

ImgBurn is a tool I still use for these sort of things

1 Like