I've been investigating some of the lightweight, command line utilities that are often used to check the status on a system. In some cases, it was hard to track down the packages they were in. It's difficult to search when some of the names are so ubiquitous. Just try running a search for the free utility.

I knew that many of the utilities were in the GNU coreutils package. I found out that many others were often supplied by the procps or the newer procps-ng packages. The procps and procps-ng packages are fairly Linux specific. So, it's not likely you'll find the code ported to other operating systems. While GNU coreutils ports to many platforms, I typically prefer GNU alternatives. They tend to be more lightweight with not as many features. Also, many GNU developers don't particularly like programming for portability and often won't accept patches for their code when there are portability issues. Many of the utilities I considered have been on Unix systems for a long time and are also available on BSD systems. The GNU versions tend to add more features and functionality. BSD systems don't use coreutils, so most of the programs are part of the operating system code.

Busybox and Toybox provide a lot of the utilities as well. Both Busybox and Toybox are designed as one monolithic program that can be accessed through links to the various utility names. That's convenient because there can be a lot of repetition between what some of these programs do. Having the code in all in one place means less maintenance for repetitive tasks. In a few cases, more standard versions of some utilities took this approach as well. For instance, the w program on a BSD system is also the who program.

It seems almost random as to what stats some of these programs cover. For instance, uptime not only gives you how long the machine was up, it also gives you how many users are on the system and system load averages. Sometimes seemingly non-related information may all be returned by the same function on a particular operating system, but sometimes it requires different functions to check each statistic. So, why put it together in this particular presentation? Likely, it's just because that's how it's historically been done and changing too much could break a lot of scripts out there. Some lightweight implementations don't always show all the information of the more common versions of the utilities either. For instance, some versions of uptime just show the boot time and don't bother with the other statistics.

Command line options for invoking a program may not be the same for different versions of a program. Also, since many of the programs have been around a long time, the command line options may not be that intuitive. For instance, I typically see -h reserved for help, but in some cases, it's being used for printing a human readable format. Some other utilities use -H for human readable. Some use both lowercase and upper case for human readable but use factors of 1024 bytes for one instance and factors of 1000 for the other. Personally, I would prefer to use -h for help and -B with a blocksize to indicate what factor I might want to divide by. That way you don't need separate command line options for kilobyte, megabyte, gigabyte and kibibyte, mebibyte and gibibtye. Many programs don't even offer options for terabyte which has become much more standard. As memory sizes go up, the older hard-coded options won't adapt as well. As mentioned, one of the issues with changing command line options to make utilities more uniform is that it could interfere with backward compatibility and cause other programs depending on that functionality to fail. However, all the various implementations aren't exactly standardized to begin with. The Open Group has some standards for utility conventions. Many programs use getopt or getopt_long to help standardize parsing of command line. However, it's not enough of a standard to prevent all the differences between different implementations. So, it's not like scripts can rely on all the same options to be there on different platforms or with non-standard software choices anyway.

I was interested in tracking statistics on memory usage, disk space, CPU usage, process and user related information and when a machine was rebooted. The tools I investigated included free and vmstat which show memory usage, df and du for disk space usage, uptime for CPU usage and boot time, nproc shows number of CPUs, ps and top for process information and utilities such as w, who and whoami for user related information.

I wanted to find lightweight alternatives that I could use on multiple platforms and not just Linux. Minix 3 uses a lot of the BSD utilities, so going with those might be one alternative. However, many still have a lot of code to implement them and the code is often very specific to BSD style operating systems.

One place to find lightweight versions of some of these utilities is ubase which was designed with the suckless.org philosophy in mind:
https://git.suckless.org/ubase/files.html
The code is very readable, but can be very Linux specific. Another alternative is nbase:
https://github.com/cheusov/nbase
This is a port of NetBSD tools to POSIX systems so that makes it a more portable option. Earlier versions of Minix had some lightweight versions of various utilities in their commands/simple directory before they switched to the BSD versions. PicoBSD also had some interesting lightweight utilities programs including aps and sps which are ps alternatives and vm which is a vmstat alternative.

There are also Windows ports of utilities such as ntop:
https://github.com/gsass1/NTop However, while some of these programs look like common Unix/Linux/BSD utilities, many are completely rewritten from scratch and would not port well to other operating systems besides Windows. Alternative operating systems such as hobby OSs that some developers create may have some of these utilities as well. After all, they're simple, command line based and useful. However, since many of the hobby OSs don't support POSIX or have large differences in kernel design, their implementations probably don't port well to other platforms either.

I'm currently in need of utilities that work on Linux, AIX and Windows. I've been investigating writing some of these utilities from scratch in a more portable manner so I can use them in a consistent way on whatever operating system I may need them. Unfortunately, they can be difficult to write, since the underlying functions are not part of the C or POSIX standards and are very platform specific. They can even change with the version of the operating system. Nevertheless, I'm going to continue to work on implementing more portable alternatives for some of the more common utilities. They're useful and their functionality is sorely missed on operating systems where they are not native. It would be really interesting to discuss design issues and trade-offs further with any developers who may be working on similar projects or with users testing out these types of utilities.

Would love to compare notes on this subject. Are there other simple command line utilities that I haven't mentioned that you use to check the status of your operating system? Do you know of other alternative implementations for some of the more common utilities mentioned? Are you interested in using some of these utilities on an operating system where they may not be as readily available? Let me know about your experiences in this area.
With Thanksgiving coming up, I've been trying to brainstorm activities for Thanksgiving for those who may be feeling isolated this holiday season. Having much less luck finding activities for this holiday than I did with Halloween.

It would be nice if some group out there had a virtual Thanksgiving dinner and invited everyone who had no place to go or no family to be with for the holiday. I'm sure there are some organizations and some families that are sharing Thanksgiving virtually. However, I've yet to find a group that is doing so and inviting the general public.

It would be fairly easy to do a virtual Thanksgiving using Jitsi Meet ( https://meet.jit.si/ ). I recently used Jitsi to talk a friend through how to do some tasks on her computer. She couldn't get Zoom working. Google Meet asked for a login which she didn't have. With Jitsi Meet, I just made up a room and we were both able to get on and conference together. She could share her desktop, so I could see exactly what was going on with her computer and talk her through how to do things.

I've checked our local library, Get Together ( https://gettogether.community/ ), Eventbrite and Meetup for Thanksgiving related events. Our library is having a fun baking event that I look forward to attending online. I've seen a few meditation events online centered around giving thanks during the holiday. Vitas is running some special bereavement support events just for the holidays: https://vitas.com/events

I will definitely be doing some holiday baking. I'll be making pecan pie. To deal with nut allergies, I'm substituting ground sunflower and pumpkin seed for the nut butter part of the filling this year. There's a great cranberry sauce recipe for the Vitamix that also makes cranberry juice during the process. Side dishes will probably include a spinach bake and asparagus. Will enjoy seeing what recipe our local library will be sharing at their event.

Thanksgiving is a great time to celebrate the harvest. I have an herb garden and will be making some things with the herb leaves. I'm also going to check out some of the virtual Botanical Garden tours available online. Could be fun to find an online gardening class or gardening group to participate in. I've been checking youtube and https://web.archive.org/web/20201022011009/https://www.mounts.org/virtual-garden-tours/ for calming virtual garden tours. Studies have shown that viewing green environments or walking in them can have a calming effect. Here's a link to one such study: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6379348/

It's also a great time to view nature and bird watch. Wikipedia has some good information on identifying birds in your area:
https://en.wikipedia.org/wiki/List_of_birds
Cornell has some bird watching resources and events as well:
https://www.birds.cornell.edu/

Any time is a good time for meditation. Here are a couple of meditations that might be fitting for the holidays. The first is to list what you're thankful for. Count your blessings. Gratitude meditations can lift your mood. Here's a link with some more information:
https://www.headspace.com/meditation/gratitude
Pure Edge discusses an Attitude of Gratitude activity called Taking in the Good. Think of someone or something in your life that you're grateful for and take some time to just appreciate it.
Pure Edge also does a very interesting breathing meditation that can be very helpful. It's called Starfish breathing ( https://pureedgeinc.org/curriculum/pure-brains-breaks/video-library/ ). You use your hand as a tactile centering tool during the exercise. It reminds me of the art activity for Thanksgiving where you draw the outline of your hand and then turn it into an illustration of a turkey.

The online library archive.org has several resources for Thanksgiving. Many are in the public domain.

If you have some other ideas for ways to celebrate and connect at holiday time, feel free to share them:
http://www.distasis.com/connect.htm

P.S.: So my Thanksgiving didn't turn out as planned and I wasn't able to do most of the things I'd planned to. As you can see from my next post, just trying to keep a roof over my head and find some place with my own kitchen so I don't starve. (I'm down to 88 pounds.) Missed many of the online events this week. Will probably be eating a turkey sandwich for dinner on Thanksgiving. This year, hope to be thankful for a mold free roof over my head (even if it's someone else's roof) and good quality (minimally processed) food that won't make me sick at a table.
Celebrating Halloween all alone? Here are some ideas and brainstorms.

First, I'd like to invite you take the Halloween Holiday Tour. It's only accessible in October.
You can find a link to it here:
http://www.distasis.com/write

If you'd like to create your own Halloween interactive adventures electronically, here are some
of the many Free, Libre and Open Source options out there:
https://playfic.com/
http://twinery.org/
https://www.alanif.se/
http://www.tads.org/index.htm
http://www.trizbort.com/

Some also allow you to create web pages without needing to be a web designer:
http://textadventures.co.uk/squiffy
http://textadventures.co.uk/quest/
http://inform7.com/

This lets you create your own mobile apps:
https://appinventor.mit.edu/

You can also practice programming and create a storyline with these tools:
https://scratch.mit.edu/
http://www.alice.org/get-alice/storytelling-alice/

If you create your own Halloween adventure and it's not too scary, feel free to let me know about it:
http://www.distasis.com/connect.htm
I'd love to hear about any Free, Libre, Open Source, Creative Commons or public domain resources for Halloween. Treat it as a scavenger or treasure hunt and try to find some of your own or help create some new ones and share them with everyone.

The Halloween Holiday Tour has several ideas for celebrating Halloween plus links to activities, so I don't want to repeat that here. What else can I cover? I have seen some interesting web sites that mention favorite music and movies to watch for Halloween, so I'll share some of mine at this time.

I like classical Halloween music such as Night on Bald Mountain. I'm in the process of transcribing it to ABC notation so I can create a midi file of it. I also like Loreena McKennit's music. Some of her songs are based on public domain music or lyrics. I took some of my favorite Halloween themed songs from various music I own and put together my own Halloween playlist. You can find free software to work with music and create your own music CDs as part of this list on Open Source software:
http://www.distasis.com/cpp/osrclist.htm

As far as Halloween TV shows and videos, some of my favorites suitable for all ages are:
Curious George: A Halloween Boo Fest
Charlie Chan: Meeting at Midnight
Wishbone: The Legend of Creepy Collars
Legion of Superheroes season 1 episode 4 Fear Factory
Voyagers! episode 4
Spooky House
Thunder and the House of Magic
Check your local libraries for them.
You can find the Charlie Chan video online at archive.org: https://archive.org/details/CharlieChanBlackMagicMeetingAtMidnight
If you run across others, suitable for any age, feel free to let me know. I may add them to the list.

I'll definitely be doing some baking this Halloween. What's Halloween without some treats to go with the tricks? Haven't decided what's on my menu yet, but there will definitely be some homemade baked goods. I also like magic tricks on Halloween. You can check out some public domain magic books for ideas: https://lmemsm.dreamwidth.org/13112.html

Here is a 1917 recipe book that includes some ideas for celebrating Hallowe'en:
https://books.google.com/books?id=TeEqAAAAYAAJ
Here is a 1911 magazine that gives some menu ideas including a recipe for soul cakes on page 28 of the October 26th issue:
https://books.google.com/books?id=Zi4xAQAAMAAJ

In previous years, one of our local parks held a wonderful annual Halloween event. Will miss it this year. They showcased some of their animals. Some of their holidays decorations were really clever. You can try these at home. They took tennis balls and decorated them with pumpkin faces. They even sprayed some orange. They cut out the back of old gallon milk containers and put tea lights in them. They used markers to decorate faces on them. They provided a nice glow toward evening.

Our Wellness Department at work mentioned virtual staycations and here was one of the links they shared:
https://www.travelandleisure.com/trip-ideas/disney-vacations/virtual-disney-park-rides-worldwide
The Mystic Manor video looked like a lot of fun and very appropriate for Halloween.

Halloween is when the walls between the worlds grow thin and spirits of the Underworld walk the earth. For some cultures, Halloween is a wonderful time to remember ancestors and family no longer with us. What ways do you remember family members at this time?

Haven't tried an escape room yet. However, I did read that one of the libraries shared a digital escape room that might be fun for Halloween:
https://ptlibrary.org/hogwarts-digital-escape-room/

Halloween Comic Fest celebrates comic books once a year. This year they're offering older comic books in electronic format in their Throwback Thursday articles:
https://www.halloweencomicfest.com/EventNews
You can also check if there are any comic book stores participating in Halloween Comic Fest virtually this year.

Have some of your own kid-friendly Halloween rituals to continue celebrating at home this year? Please share them and help brainstorm some positive and safe ways to enjoy the holiday.
The last post mentioned other groups' projects with dictionaries and language resources. I thought I'd mention some of the projects I've been working on in this area.

I've been creating build scripts with the LM BLD project ( http://www.distasis.com/cpp/lmbld.htm ) so that I'll have automated, repeatable steps to build programs, libraries and other types of packages. Here are some of things I've been working on.

The Moby project is a very nice dictionary resource. Using their thesaurus, I was able to create a word list and a simple dictionary in stardict format. I use it with Open Source programs like scramble.

The Strongs concordance is in the public domain. I've created a translation dictionary in stardict format with it.

I happen to like the stardict dictionary format. There are several nice programs that can work with that format. I wanted something lightweight that would work well on older systems or let me create my own GUI interfaces. The closest thing I could find to what I wanted was sdcv. However, there were a few issues I had with it. The biggest is that it requires glib as a dependency and I didn't want to install GTK+ related dependencies on my systems. The second issue I ran into was that it couldn't handle some of the newer versions of the stardict format. Since the code is GNU GPL licensed, I started with it and made several modifications and customizations. The result is sdcv2 which can be linked to my own Unicode shared libraries in place of glib if desired and can work with dictionaries in more recent stardict formats. It may not make use of all the latest features in the newer formats, but it can at least access information from them.

I've seen other projects that use the sdcv library as a back-end and create their own GUI for a dictionary program. It makes sense if the program uses GTK+, but it seems awkward for Qt or other GUI programs to require GTK+ related dependencies. With sdcv2, there are no GTK+ related dependencies.

I would love to find a dictionary with a FLTK GUI, especially if it can handle stardict format. Since, I haven't been able to find one, I may try to write one at some point. I've also been thinking about creating a pdcurses front end. When I use sdcv (or sdcv2) from the command line, certain systems like Windows can't handle input or output of certain Unicode characters correctly. I've added support for SDL 2.x, SDL2_ttf and the ability to work with a range of Unicode characters within the UCS-2 character set to pdcurses. I think pdcurses would make an interesting front end for a program using the sdcv2 library. It would work on any system that supports SDL 1.x or 2.x, including more unusual operating systems like Syllable and Haiku. Would like to hear from others who may be interested in or are working on similar projects.

The dictzip program compresses dictionary files. It uses an extension to the gzip format with extra fields to include information about the compressed dictionary. Files compressed with this format often use the .dz extension. You can use dictzip with stardict files to save space. dictzip is primarily a POSIX compliant program, so it doesn't convert well to certain systems. I was able to find a Windows port that limited the program's functionality, but did enough to get the job of compression done. I've made some modifications to it and am using it as a cross-platform method of compressing stardict dictionary files.

Several utilities and conversion programs were created for stardict in the stardict-tools project. Similar to stardict and sdcv, glib is a dependency for stardict-tools. There are a few tools that use a GTK+ front-end as well. I personally only use the stardict-tools to convert tab delimited files and files in babylon format to stardict. So, I modified the command line tools that do those conversions to build without glib. I also created my own makefile just to build the tools I use.

I've searched and I've yet to find a rhyming dictionary in stardict format. So, I'm working on creating one. It's a slow process. I've taken a public domain rhyming dictionary as a starting point and I'm in the process of editing it and converting it to the format I need.

I've also been searching for an Open Source C/C++ grammer checker, but I've yet to find one that I like.

These are just some of the projects I'm working on. If you're interested in comparing notes on these topics or if you have recommendations of other dictionary and word related projects you like, feel free to contact me ( http://www.distasis.com/contact.htm ).
It's hard to find public domain, Open Source and Creative Commons licensed language resources in formats that are easy for programs to work with. There are growing resources of scanned public domain books. Among them, you can find all kinds of dictionaries and references. Some sites even use an OCR to translate scanned documents to text formats. However, the translated versions are usually full of typographical errors.

There are a few projects out there that use Free, Open Source or Creative Commons licensing and have a goal of creating dictionaries or other references in accessible and searchable digital format, but not a lot. It would be nice to see more projects of this sort. The results could be useful with word processors and editors (such as LibreOffice, Abiword, SciTE), electronic dictionaries (such as stardict) and games (such as anagramarama and scramble).

Here are some of the projects I've located:

XDXF, the XML dictionary interchange format, project had a collection of dictionaries and language translation word lists they were working with and converting to various formats.
https://sourceforge.net/projects/xdxf/files/
They also have tools for converting between XDXF and other formats:
https://github.com/soshial/xdxf_makedict

The Moby project is a wonderful public domain resource. It includes word lists, thesaurus and more.
http://icon.shef.ac.uk/Moby/

The Free Dictionaries Project also provides downloads. If you want to translate one language to another, this is a useful, free resource:
http://www.dicts.info/uddl.php

SCOWL (Spell Checker Oriented Word Lists) and Friends has useful word lists and resources for spell checker utilities:
http://wordlist.aspell.net/

YAWL (Yet Another Word List) is based on the updated Public Domain ENABLE (Enhanced North American Benchmark Lexicon).
You can also find Libre licensed word lists in FLOSS games such as anagramarama.
http://www.sourcefiles.org/Games/Puzzle/Other_Word_Games/

Public Domain Chinese Dictionaries. I'd love to see some of this translated to stardict format. stardict-tools has some simple command line tools translate other formats to stardict format.
https://mandarinportal.com/public-domain-chinese-dictionaries/

Here's a rhyming dictionary (source code and online example) that uses Moby project resources to find rhymes:
http://stevehanov.ca/blog/index.php?id=8


If you know of other projects or developments in this area, I'd love to hear about them ( http://www.distasis.com/connect.htm ).

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 07:32 am
Powered by Dreamwidth Studios