Archives

Antranig Vartanian

June 12, 2025

A while back I needed to get the input voltage from one of our UPSes, so I used bsnmpwalk(1) to get the information needed and ran it in a script with a loop and sleep. Running it in tmux(1), of course.

#!/bin/sh

lastoff="maybe"

while true;
do
  inpvol=$(bsnmpwalk -o quiet -s public@172.20.42.101 1.3.6.1.2.1.33.1.3.3.1.3)

  [ $? != 0 ] && \
    curl -s -X POST \
    https://api.telegram.org/botXXX:YYY/sendMessage \
    -d chat_id=-ZZZ \
    -d text="Something is wrong with the SNMP server"

  [ "${inpvol}" -lt 200 ] && \
    curl -s -X POST \
    https://api.telegram.org/botXXX:YYY/sendMessage \
    -d chat_id=-ZZZ \
    -d text="Power seems to be off. I see Input Voltage as ${inpvol}" && \
    lastoff="true"

  [ "${inpvol}" -ge 200 ] && [ "${lastoff}" == "true" ] && \
    curl -s -X POST \
    https://api.telegram.org/botXXX:YYY/sendMessage \
    -d chat_id=-ZZZ \
    -d text="Power back on. I see Input Voltage as ${inpvol}" && \
    lastoff="false"

  printf "%s  ---  %s\n" "$(date)" "${inpvol}"
  sleep 60
done

This got the job done, but I guess there’s place for improvement (leave a reply).

Anyways, I kept forgetting that I need to run the script in tmux after reboots, so I decided to use daemon(8).

touch /etc/rc.local
chmod +x /etc/rc.local
cat - >> /etc/rc.local
#!/bin/sh

daemon -u nobody -r -R 5 -f -t ups-notifier -o /var/log/ups_notifier.log /usr/local/bin/ups_notifier.sh

Again, there’s a place for improvement, specifically I can use a proper rc.d(8) script, yet again, this gets the job done.

Gotta say, I love the simplicity of FreeBSD.

Antranig Vartanian

February 27, 2025

For years I’ve been a night owl, staying up late until 5AM, hacking on code, chatting with friends and even drinking coffee at that late hour. I’ve been told that it’s a genetic thing, that people don’t choose what kind of a person they are, morning or evening. And yet, when I tried to find my “natural sleep cycle”, looks like I’ve been functioning at my best when I sleep around 10PM and wake up at 5AM. This has been a very weird experience, but what else do I not know about myself? I am not sure. The unknown unknown is a very weird place, unlike the known unknown.

In either case, I will keep a detailed log of my sleep for the coming months and see how if I actually function better, or is it just an illusion.

What’s your sleep cycle? when do you hack on code? or do you stay up late watching YouTube videos and doom-scroll on social media?

Antranig Vartanian

January 3, 2025

Here are some issues I had, which I fixed in the last three days

  • Email client not updating properly on phone. Fixed
  • Too many apps on phone and programs on computer. Deleted
  • Too many notes here and there. Collected and centralized
  • Too many packages outdated. Upgraded
  • Too many messages from friends left unanswered. Answered
  • Too many wires and cables in the cabinet. Organized
  • Too many cameras unused. Pictures Captured
  • Too many things on my TODO lists. Clarified.

Sometimes all you need is to sit down, clean up your laptop’s monitor and get to work.

Wish you all the best in the coming year. And if I ever missed your message, I’m sorry. If I ever texted too much, I am not.

That’s all folks…

Antranig Vartanian

December 22, 2024

We’ve organized a CTF (again), but this time it was way more interesting than the previous years, not just because of the newly introduced challenges, but because finally we are seeing the effects of LLMs in our industry, both the good and the bad, and we can now predict one of the possibilities of the future.

I need to articulate my thoughts for couple of days, and a long post might be published soon.

Antranig Vartanian

October 20, 2024

The story that Stefano shares in Outdated Infrastructure and the Cloud Illusion is a very sad one. I’ve seen this happen even at governments.

Current hypes aside, the NIST definition of Cloud Computing is actually under-hyped. A cloud should be on-demand, broad, elastic and measured. However, it can be Public, as well as Private. People keep forgetting that we can have Private Cloud deployments, and systems like FreeBSD, even Proxmox, have the ability to do that.

We can do better.

Antranig Vartanian

October 18, 2024

Couple of years ago I read the book “Getting Things Done” by David Allen. One of the things he mentioned is that

When I coach a client through this process, the capture phase usually takes between one and six hours, though it did take an entire twenty hours with one person (finally I told him, “You get the idea”)

Initially, I did not believe this. I’m not saying that David was lying, but rather, I cannot believe it took someone twenty hours to “unload” their state of mind.

Today, I take that back. I’ve fallen off the wagon (or is it “on the wagon”?) couple of months ago, and today I decided to recapture and re-implement my setup.

It took me 6 hours, and I’m not even at my peak load. I can’t imagine what would’ve happened if I delayed longer, or took on more projects.

Now that I have 120 things in my “Next Action” list (according to OmniFocus), I can finally feel calm knowing that I know exactly what I have to do. Hell, I even found time to blog about it.

See you tomorrow…

Antranig Vartanian

October 6, 2024

Initially, Jailer has had a single image format to download, the “FreeBSD base image”, also known as base.txz.

Now we’re trying to integrate PkgBase, OCI images, Jailer binary images, Jailer source images (jailerfile), Linux bootstrap images, and regular tarballs.

This is the point where I just want to kill myself. This is harder than expected.

Linux has a package management problem. I’m having a “too many registry types” problem.

Let’s see how it goes.

#Jailer #FreeBSD

Antranig Vartanian

June 5, 2024

I’m having a hard time understanding how these BootCamps work. Their whole value is teaching people how to code, sometimes they also teach programming, but not always. As far as I can tell, they never teach how to use a computer, which is weird.

Take car mechanics as an example, I assume they know how to use a car and the basics of how it works before they start fixing things. But the same doesn’t seem to be true about coding/programming.

I met with a couple of students today who were going to a BootCamp to learn coding-y, DevOps-y and Security things, but they were not able to define what an OS process is. They also had a hard time interacting with a computer.

How did we get here? No, this is not a rhetorical question, I really want to know.

I’m not saying that everyone should know everything about every operating system, but during your work, where you get paid, you will need to use tools such as grep, AWK, xargs, etc.

I remember, once, years ago, I was supposed to teach “security” to a group of students, but I realized it would be more helpful if I teach them Unix and computer networking, so we ended up doing that.

Months after their graduation, I saw one of the students, and he asked me “hey, can we do these Unix classes again? Looks like they were important”.

I ended up mentoring him, and now he does mostly Taco Bell programming and he gets things done.

My feeling is that we need a book for everyone that’s named “learn this before learning how to program” and we teach basic things such as process management, service management, the Unix shell, how a computer network works, etc.

But alas, I barely have time to blog, however I feel that this computer book would be a best seller everywhere.

Back to work, cheers.

Antranig Vartanian

June 1, 2024

The cab driver is playing classical music, Symphony in C: IV. Finale (Allegro Vivace) by Orchestre National de France & Jean Martinon to be more specific and I’m loving it.

Looks like someone will be getting ⭐️⭐️⭐️⭐️⭐️ and a large tip.

I’m pretty sure it’s radio (I can see the music player) but it’s still lovely.

Antranig Vartanian

May 30, 2024

The FreeBSD Developer Summit Day One was live streamed yesterday and the video is up on YouTube at May 2024 Developer Summit Day 1.

I will be watching Day Two live as well, and I love how FreeBSD brings us all together.