[Freedos-user] Interesting Project: dosfetch like neofetch

2024-01-08 Thread Louis Santillan via Freedos-user
https://github.com/leahneukirchen/dosfetch

One of the hallmarks of modern Linux CLI environments differentiating the
various distro vendors is a linux tool called neofetch.  A tool
which probes the local environment will let you know some of the key
features or metrics of the local environment (CPU, RAM, DISK, NET usage, OS
flavor, CPU vendor, Hypervisor vendor) and pretty print that info (great
for CLI OS screen captures to make them nicer looking/more appealing).
Somewhat akin to a combination of `uname`, `top`, and others.

Jerome's V8 Power Tools (https://github.com/LoopZ/V8Power) also has some of
these features (I think) as well.

dosfetch seems to aspire to do the same for DOS as neofetch.
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] SNMP agent for DOS?

2024-01-08 Thread Michael Brutman via Freedos-user
That last post was impressive, but I think it makes things way too
complicated.

Obviously something that does real-time operations should not be burdened
with a TSR.  But it should also not be burdened with running DOS on legacy
hardware either.  Nobody in their right mind is running something safety
critical on old PC hardware running DOS, so assume there is some room for
slop in the workload.

An SNMP agent TSR can do the following:

   - Respond when polled; that's an important function right there.
   ("Heartbeat")
   - "Guesstimate" the CPU utilization
   - Pick up and report from whatever location in memory you care about.

The TSR has to respond to interrupts from the network device.  It also
needs to hook the timer interrupt for ARP processing.  Since you have the
timer interrupt hooked already, you can look at the stack to see the
interrupted address and estimate whether the interrupted code is in DOS, in
an idle loop in the main program, or whatever.  (For a normal DOS system
that spends its time at the command prompt that is easy.  For a
continuously running program that program must have an event handling loop,
and there are a few ways to detect and deal with that.)

Anyway, back to the question ...  it's possible.  If you are just going to
check a box for compliance reasons, then it's probably not doing unless the
cost of non-compliance is high.  (If an ISO certification is riding on
this, spend the money to do something.)  If this is really supposed to be
part of your monitoring solution and you need it, well, you've done well on
borrowed time ...


-Mike
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] SNMP agent for DOS?

2024-01-08 Thread Frantisek Rysanek via Freedos-user
On 7 Jan 2024 at 21:28, Anton Gustafsson via Freedos-user wrote:
>
> Hi Roderick! I agree, in this case it is mostly to satisfy my 
> supervisor's need to follow protocol. All machines in the network are 
> supposed monitored (load, mem, swap etc) using a software called Zabbix 
> which has the ability to use either their own agent, ICMP or SNMP.
> 
> It is possible to use Zabbix without an agent, and for example only 
> check availability over ICMP pings. It is a slight workaround, since the 
> actual frontend on Zabbix shows hosts as unavailable when not using an 
> agent, though they it is possible to configure the system not to send 
> "host_down"-emails. There seem to be disagreements within the Zabbix 
> developer community whether this is a bug or a feature.
> 
> Anyway it feels a bit redundant since these machines are custom hardware 
> controllers and are integrated in the rest of the process system, and 
> the control room interacts with these machines continuously.
> 
DOS is not a multi-tasking OS, does not have a process scheduler and 
only uses a single CPU core.
There's a single application running in the foreground, having total 
control over pretty much everything, and that's it.

Yes you can have "resident" pieces of software (aka TSR) that remain 
loaded and "can do things in the background", but that "background" 
is just a piece of the CPU time, principally spent in an interrupt 
service routine. While the TSR is doing its thing, the piece of 
software in the foreground is asleep. Not knowing the details, I'd 
suspect that a feature-complete SNMP stack might easily turn out to 
be quite hefty.

SNMP is not necessarily a CPU hog, but a decent SNMP software stack 
will be neither simple, nor minuscule in the RAM.

Allright, desktop software (and its users) are normally tolerant to a 
bit of lag here and there.

If you're speaking Industrial Process Control, that's a red flag.
(Are you?)
You have a piece of legacy control software running in DOS, assuming 
that it has the whole machine for itself, likely relying on 
deterministic timing and response to incoming events. The software is 
possibly running a tight loop clocked by the system timer and/or 
interrupts from some dedicated I/O peripherals.

Losing critical CPU time to a nosey SNMP monitor is generally not an 
option! And there is no CPU process scheduler to sort tasks by 
priority. Spending too much time in an ISR is a big no-no.
And, anything running in the normal foreground context (i.e. outside 
of an ISR) has a lower priority than any IRQ.
Yes, IRQ's can be ordered by priority, but it generally requires 
programming of the IRQ controller. This isn't something you want to 
do to unsuspecting legacy control software "behind its back".


So apart from that principal problem above:

Roderick has already mentioned DMH software.
I also recall Lantronix having an SNMP module for their Xport line of 
miniature "terminal servers" (serial-to-ethernet gateways) - the old 
Lantronix had an embedded x86 environment similar to BIOS/DOS, not 
sure about the current product line.
Both are principally SDK's, providing SNMP in the form of a library, 
documentation and "interface bindings" for some programming 
environment, that allows you to add the missing bits specific to your 
project or platform. I.e., to deploy these SNMP products, you need to 
do some programming.

The DMH SNMP API probably depends on DMH's own TCP/IP stack, which in 
your case would be a second TCP/IP stack besides the Microsoft 
stack... not sure if they can run side by side and share a NIC...

The Lantronix SNMP module depends on Lantronix hardware and a 
particular development environment. Not really made for generic DOS.


Yet again, apart from the problems mentioned above:

Someone in this thread has already raised the question:
*What* would you want to monitor, in a PC with DOS?
DOS doesn't have a CPU scheduler.
Means you cannot quite monitor CPU usage, as seen by the OS.

You *could* monitor a select few CPU MSR's, related to system power 
management - the current state of EIST/TURBO, and the CPU core 
temperature. Provided that your (legacy?) CPU's support those HW 
features. Note that in DOS, the CPU never goes IDLE, and therefore 
the CPU's own internal power management will see the CPU's "control 
unit" as active all the time (100% CPU utilization).
You could possibly hazard access to a SuperIO HW monitor, which has 
information about fan RPM and voltages.

Are there any disk drives involved? These have SMART - but I don't 
think there's a BIOS service for SMART, or for crafting your own ATA 
command and passing that to the BIOS disk service... = you'd probably 
need your own disk driver, and circumvent the running system's disk 
driver to avoid an unhandled race condition...

If the control system had some interface, such as a page of RAM at a 
"well known address", or a "software interrupt" for that purpose, you 
could theoretically take some variables from 

Re: [Freedos-user] What DOS programs represent the 1980s and early 90s?

2024-01-08 Thread Rugxulo via Freedos-user
Hi,

On Wed, Jan 3, 2024 at 4:30 AM Frantisek Rysanek via Freedos-user
 wrote:
>
> my first PC at home was a 386DX/40 in about 1991/1992

I'm American, but we're roughly the same age, and I started with a 486
SX/25 in 1994.

> All the school had at the time was Pascal with objects

I've become a big fan of Pascal in the past decade or so. Turbo Pascal
was really well done, but there were others too.

> I recall that two of the best students coded a software app in
> Borland Pascal with Turbovision for creating daily/weekly teaching
> schedules for the school. A pretty advanced piece of software,
> considering use of objects / "dynamic data", the data model, and the
> algorithmic manipulation / application of constraints etc.

Impressive!

Niklaus Wirth (RIP) did a lot of teaching, writing, and programming
over the course of his career. His work (Pascal, Modula-2, Oberon, et
al.) either directly helped or inspired a ton of people. Even if you
ignore DOS and Turbo Pascal (or even Delphi), there's still plenty to
learn from him and followers of such languages.


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user