Show ram usage percent in command prompt - memory

I know this is probably a noob question but I'm trying to write a script that needs to obtain the system ram usage in a percent and output it like this 5% but I cant find any resources on how to do that. If anyone could help I would appreciate it. Thanks!

Related

How to make Lua print to what I'm doing on my computer

Hi I used to program back in the basicA Qbasic we wrote the program inside it and made executable well in paschal. But IDE don't confuse me as much as how do I pipe something out? Any help is appreciated. Also I would like to take the time in advance to thank you for listening and helping 😃
Also I would like to get into scripting

I want to make a procedurally generated virtualized drive - how can I do this?

I've had the idea for a procedurally generated virtual drive bouncing around my head for a long time. It wouldn't really have any uses, and really it would just be for the memes, but I've finally settled down and decided to make it.
The idea is to make a fake drive that, whenever a program asks for a sector from, a bit of code will generate that sector on the fly (instead of reading it from a storage medium like a normal drive). Of course, writing to the disk would be impossible, but that's ok - I'm just doing this for fun.
Question is: how do I actually make this appear as a drive?
I should think there's a library out there somewhere that will let you directly, but I haven't been able to find it yet. I don't really know what keywords I should be searching for, either.
I have a lot of experience with Arduinos and hardware - would it be easier to simply connect the SPI pins to an SD card slot and get the Arduino to generate the "sectors"?
I'm thinking of using this to play around with file systems and ridiculously large files - after all, there is no limit to how big the drive can be (since it doesn't require any real memory), besides 32 bit or 64 bit limits, which could be a lot of fun - if only to pretend you have a zettabyte of disk space. Even though it would be read only, I'm curious how Notepad would handle a petabyte txt file.
If anyone has any ideas on how to do this, or knows some better keywords I can use to search for this, let me know!
(I am fairly fluent in Python, Arduino, and I can do a little C if I sit down with a coffee)
You didn't specify how you wanted to tackle this, but on Linux there's Fuse, the Filesystem in Userspace. It's a library that allows you to implement functions that handle the usual filestem operations, i.e. enumerating files and directories, opening files and reading/writing to them.
It also has a python wrapper and a tutorial.

What is being stored and where when you use cv2.VideoCapture()?

If I were to turn on my camera with cv2.VideoCapture(0), without any other code to read or save frames, is there anything being temporarily stored (i.e. in the heap)? If I do not release and have this process run continuously, will memory be built up until it is out of memory space?
Context:
I am currently using a Raspberry Pi camera and am thinking about using cv2.VideoCapture() followed by read() to replace PiCamera().capture() for the purpose of speed and efficiency. To put in other words, I am considering taking a frame from a video stream to use in place of a photo. As I consider the pros & cons, I came across this question. Any comments and/or advice is appreciated.
Note that I am also new to stack overflow, so if I apologize in advance for anything unconventional in this posting.

Micro SD Card as Arduino "main memory"

I would like to know if it is possible to store font code in a Micro SD card and then, afterwards, access this code to run the routines.
I'm doing some stuff with Arduino nano and due to the amount of sensors and components, I'm having problems with memory. It is causing an instability that might affect things to work properly.
Any suggestions?
The best suggestion that I can give you, is switch to an Arduino Mega, or an Arduino Due.
If you are not open to that solution, then things are going to be rough.
What you will need to do, is write a bootloader, which is able to read from the memory card and change the flash contents of your Atmega.
What this essentially means is that you have to write an OS level program for your Arduino Bootloader, and use the memory card like a hard-disk and the rest of your Arduino flash as the program RAM.
I hope this helps, good luck.
Nitro, Gerhard and datafiddler,
My problem was solved by a simple code optimization. I'm new to this Arduino world and so I was using a lot of unnecessary stuff.
I appreciated the help provided. Thanks!

how to check data usage

Hi take days looking information about this and I have found absolutely nothing, is there app like Onavo using a proxy, but some do not and I need to know how much data I'm consuming at one point to see if it is producing for such a shock, I need a lot of help if they have some information please help. for example:

Resources