kolibrios/programs/system/shell/cmd/cmd_memory.c
Nasarus 4b4d896f8a Shell 0.4.5: Multilanguage, russification, some new commands (see History.txt for details)
git-svn-id: svn://kolibrios.org@1668 a494cfbc-eb01-0410-851d-a64ba20cac60
2010-10-20 23:58:36 +00:00

19 lines
642 B
C
Raw Blame History

int cmd_memory(char param[])
{
unsigned total, free, used;
total = kol_system_mem();
free = kol_system_memfree();
used = total - free;
#if LANG_ENG
printf (" Total [kB / MB / %%]: %-7d / %-5d / 100\n\r Free [kB / MB / %%]: %-7d / %-5d / %d\n\r Used [kB / MB / %%]: %-7d / %-5d / %d\n\r",
#elif LANG_RUS
printf (" ‚ᥣ® [Š<> / Œ<> / %%]: %-7d / %-5d / 100\n\r ‘¢®¡®¤­® [Š<> / Œ<> / %%]: %-7d / %-5d / %d\n\r ˆá¯®«ì§ã¥âáï [Š<> / Œ<> / %%]: %-7d / %-5d / %d\n\r",
#endif
total, total/1024, free, free/1024, (free*100)/total, used, total/1024-free/1024, 100-(free*100)/total );
return TRUE;
}