6

I have a piece of computer hardware in my lab that is running an Intel Celeron CPU with 300 MHz and 128k bytes of secondary cache. The hardware documentation says it's running an real time operating system (RTOS) called pSOS (Portable Software On Silicon). I wanted to measure what is the load on the CPU to know if I can load more stuff into it.

Because this is legacy hardware, I am having a hard time trying to find any information or guide on how to measure CPU usage for this chip.

My best guess is that I can do that using TELNET and the correct command to read CPU usage and memory allocation. I can already TELNET to the CPU and by using the help command I get a list of commands. The problem is, I have no idea what is the exact command I have to type in order to read that kind of info. And I am afraid to mess up the CPU.

---Updates

This OS don't support uname nor top commands.

But it does support arp, netstat, ifconfig.

FTM
  • 171
  • 5
  • 3
    Do you know what OS it's running? Or could you post a transcript of your Telnet session? (Make sure IP addresses, usernames and passwords are redacted.) Alternatively, your DHCP server might give you a clue what it's running, or run nmap -O -sV 10.0.0.1 from a Linux machine to tell you what OS is running on 10.0.0.1. – snips-n-snails Jan 18 '18 at 20:54
  • Yeah, that's the problem. We almost don't have access to the inner part of the hardware. The only way we interface with it is through an ethernet port. When I come back from the lab tomorrow I will update this post with some more info about the TELNET session. And I will also try the linux command as well. Thanks @traal! – FTM Jan 18 '18 at 21:14
  • 1
    Measuring CPU usage is an aspect of the operating system. In a general sense, unless the CPU is actually "asleep" (which is a hardware state), the "CPU usage" is always "100%". What the operating system measures is how of the CPU is doing something BESIDES spinning idle waiting for an interrupt by an external device or timer. But "spinning idle" is, well "CPU usage". So, short story, it's up to your operating system, to answer this. This is not (typically) a hardware problem. – Will Hartung Jan 18 '18 at 22:38
  • @WillHartung, is there a way to discover what OS is running on this hardware? Remember, as I said, we are limited here to only interact with this hardware using an ethernet port and TELNET sessions. Unless there is something else we missed (and that's possible, as we are not computer engineers, but automation engineers). – FTM Jan 19 '18 at 07:40
  • TELNET usually gives you some shell, try to execute uname -a there to gather information about the system – Tommylee2k Jan 19 '18 at 07:51
  • @Tommylee2k, I have tried that and uname nor top are recognizable commands in this OS. – FTM Jan 19 '18 at 08:01
  • "I can already TELNET to the CPU" - no, you cannot. Intel started to include MINIX in their CPU's much later :-) (and even that likely does not include a telnet daemon) – Radovan Garabík Jan 19 '18 at 08:05
  • @RadovanGarabík, maybe I should have said "TELNET to the OS"? :) – FTM Jan 19 '18 at 08:43
  • 1
    Hey everyone, OS type identified. It is caled pSOS. – FTM Jan 19 '18 at 10:26
  • 1
    I was about to challenge that this question fits here - But, as psos+ has been discontinued 19 years ago, we probably need to accept this question. I wasn't even aware psos would run on Intel. Only knew it to be supporting 68000 – tofro Jan 19 '18 at 10:34
  • does "help" show anything like "task list"? – Igor Skochinsky Jan 19 '18 at 14:34
  • It doesn't @IgorSkochinsky – FTM Jan 20 '18 at 09:36
  • 1
    can you post the output of “help”? – Igor Skochinsky Jan 20 '18 at 11:32
  • If you have access to an SDK for the system then writing a simple busy loop program (either a fixed number of iterations or an infinite loop with output every n iterations) could provide insight. Run it as a non-realtime (or lowest priority) task and again as a high-priority realtime task. The difference in runtimes should give you an idea of how much headroom (idle time) there is on the system. – Alex Hajnal Nov 24 '21 at 20:53

2 Answers2

4

Apparently, you're ending up in psh, the pSos+ shell.

Note what you have is an embedded system that is completely customized - So what you can and cannot do is entirely depending on what the system builder wanted you to be able to do.

psh+ manual (for PowerPCS, but I'd assume Intel is similar) can be found here:

http://bagfed.free.fr/pSOS/PSOS_Programmers_reference.pdf

(starting from pg. 1-114) Just browsed this shortly to find some sort of system load indicators, but a quick glance did not reveal anything.

System load information can only be retrieved if the realtime kernel actually collects it - And in the case of PSos, I'm afraid it doesn't. So, no luck.

tofro
  • 34,832
  • 4
  • 89
  • 170
  • Hello @tofro, I also found this manual a few minutes ago. And I am also getting to the same conclusion, that it will probably not be possible to retrieve that info... – FTM Jan 19 '18 at 11:12
1

As others have pointed out, knowing what OS is running is really the key. help as a valid command could be any variant of *nix, but also many other operating systems and even an application that is processing the telnet command instead of an OS shell process. But assuming it is some variant of Linux or a similar OS, try the top command. The options vary, but typically it starts off running showing the "biggest" programs at the top sorted either by memory usage or CPU usage. It also lists some overall system information, such as total memory available and total memory used. The specifics vary a bit by OS version.

One other item that would be helpful to figure out system capacity is the memory. You mentioned 300 Mhz. (speed) and 128k secondary cache, but not the amount of total system RAM. A quick search shows system of that vintage with 32 - 64 Meg., but I wouldn't be surprised to see quite a range from "single task" systems with less to top-of-the-line servers with much more, though Celeron has always been on the budget side so this was probably never a top-of-the-line server.

  • The scarce and really bad quality documentation we have about this hardware says it has "32 to 256 Mbytes Synchronous DRAM with parity / ECC". So, I see that my first task is to discover which OS is running in this hardware. How could I do that? – FTM Jan 19 '18 at 07:06
  • @FTM - Lots of unknowns. But basically you start with whatever works. For example, if the top command works that my give you some clues. What does the help command tell you? What is the initial prompt when you log in via telnet? – manassehkatz-Moving 2 Codidact Jan 19 '18 at 07:12
  • unfortunately lots of them. I just tried it out using TELNET and it says that both top and uname are unknown commands. When I log in using TELNET, the only message I get back is "Welcome to Telnet Shell session". – FTM Jan 19 '18 at 07:42
  • @FTM what about any other common *nix command? I'd try echo, set, cd, pwd, ls and, just in case it runs any MSDOS derivative, dir. – Radovan Garabík Jan 19 '18 at 08:07
  • both uname and top are external commands. just because the shell doesn't find them doesn't mean it's not a unix/linux/minix machine, perhaps they've been removed from /bin (or /usr/bin), or you don't have a $PATH set to there. what does ls -lR / show ? – Tommylee2k Jan 19 '18 at 08:27
  • You could use man ls or something, and see if the man pages give any clue about what software distribution it's running – Omar and Lorraine Jan 19 '18 at 08:46
  • @Wilson, I tried it out but the man command was not found. @Tommylee2k, I tried that command out but that seems to have overloaded the system. But I did got some interesting info about the folder structure. I will have to wait for my coleaguee in a different time zone to wake up and reset the hardware because I can't communicate with it now. :) – FTM Jan 19 '18 at 08:57
  • @FTM if ls works, then that is more likely *nix and you can try to see if there is a /proc directory. If there is a cat command as well, then everything becomes much easier (cat /proc/loadavg if it's actually Linux). – Radovan Garabík Jan 19 '18 at 09:02
  • @RadovanGarabík, ls words, cat as well. But I don't have such a /proc directory. – FTM Jan 19 '18 at 09:20
  • @FTM then look at the filesystem - start with ls /, maybe even ls -l / (if it works), then ls -l /*, then look into the directories... Lack of /proc says it's probably not Linux nor *BSD, or a very pruned one. Is there a mount command? – Radovan Garabík Jan 19 '18 at 09:33
  • @RadovanGarabík, ls -l / works, but ls -l /* gives a "/*: illegal filename syntax" output. But "ls -lR /" works! Finally, the mount command works! – FTM Jan 19 '18 at 09:39
  • @FTM, yeah, you can look what directories ls -lR / shows and it will become more clear... – Radovan Garabík Jan 19 '18 at 09:50
  • Hey everyone, OS type identified. It is caled pSOS. – FTM Jan 19 '18 at 10:26
  • @FTM wikipedia claims pSOS is Motorola 68000 only. Are you sure it's not pSOS+? Anyway, since it's proprietary and not Linux and dead and there is no /proc, your best chance is finding someone who worked with pSOS[+]. – Radovan Garabík Jan 19 '18 at 12:20
  • The documentation says it is pSOS. But it is so badly written that I don't doubt it might be pSOS+. Anyhow, as measuring these stuff would be desirable but not a requirement, I think I am about to just give it up. :/ – FTM Jan 19 '18 at 13:12
  • @ftm pSos+ was available for m68k, PPC and x86. You're right, originally (without the plus - and quite some time with the plus) it was m68k only. – tofro Jan 19 '18 at 14:38