Questions tagged [system]

System may refer to a set of interdependent components; Low level infrastructure like the operating system (from a high language point of view) or an object or function for accessing the previous

The system tag is used for referring to the operating system, or functions thereof, when accessed from a higher-level language.

Many high-level languages offer access to the features of the system by an object or function called system itself. Questions regarding these objects might as well be tagged with this tag.

In normal English, a system is a set of interacting or interdependent components forming an integrated whole or a set of elements (often called 'components' ) and relationships which are different from relationships of the set or its elements to other elements or sets.

4678 questions
587
votes
12 answers

How do I execute a command and get the output of the command within C++ using POSIX?

I am looking for a way to get the output of a command when it is run from within a C++ program. I have looked at using the system() function, but that will just execute a command. Here's an example of what I'm looking for: std::string result =…
Misha M
  • 10,979
  • 17
  • 53
  • 65
586
votes
14 answers

How can I check the system version of Android?

Does anyone know how can I check the system version (e.g. 1.0, 2.2, etc.) programatically?
davs
  • 9,226
  • 8
  • 41
  • 54
496
votes
21 answers

How to get current CPU and RAM usage in Python?

How can I get the current system status (current CPU, RAM, free disk space, etc.) in Python? Ideally, it would work for both Unix and Windows platforms. There seems to be a few possible ways of extracting that from my search: Using a library such…
lpfavreau
  • 12,871
  • 5
  • 32
  • 36
353
votes
19 answers

Getting output of system() calls in Ruby

If I call a command using Kernel#system in Ruby, how do I get its output? system("ls")
Macha
  • 14,366
  • 14
  • 57
  • 69
350
votes
2 answers

Java system properties and environment variables

What's the difference between system properties System.getProperties() and environment variables System.getenv() in a JVM?
Praveen Sripati
  • 32,799
  • 16
  • 80
  • 117
299
votes
7 answers

Difference between a "coroutine" and a "thread"?

What are the differences between a "coroutine" and a "thread"?
jldupont
  • 93,734
  • 56
  • 203
  • 318
243
votes
17 answers

Get OS-level system information

I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows. Has anyone been able to successfully extract information such as the current disk space used, CPU…
Steve M
  • 10,517
  • 12
  • 52
  • 63
233
votes
5 answers

How to run cron once, daily at 10pm

I had entered: * 22 * * * test > /dev/null However, I am being notified via email that this is running every minute. I am confused I guess because I thought this was correct for what I am wanting.
user420095
209
votes
12 answers

Why doesn't "System.out.println" work in Android?

I want to print something in console, so that I can debug it. But for some reason, nothing prints in my Android application. How do I debug then? public class HelloWebview extends Activity { WebView webview; private static final…
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
194
votes
5 answers

Difference between subprocess.Popen and os.system

What is the difference between subprocess.Popen() and os.system()?
Arovit
  • 3,579
  • 5
  • 20
  • 24
172
votes
2 answers

C: Run a System Command and Get Output?

I want to run a command in linux and get the text returned of what it outputs, but I do not want this text printed to screen. Is there a more elegant way than making a temporary file?
jimi hendrix
  • 2,239
  • 5
  • 19
  • 18
97
votes
7 answers

How to implement tag system

I was wondering what the best way is to implement a tag system, like the one used on SO. I was thinking of this but I can't come up with a good scalable solution. I was thinking of having a basic 3 table solution: having a tags table, an articles…
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125
83
votes
1 answer

Convert R vector to string vector of 1 element

Im working with the programming language R now. I have a vector: a <- c("aa", "bb", "cc") And I want to paste these to a system command, I'm trying it this way now: args <- paste(a, sep=" ") system(paste("command",args, sep=" ")) But now I'm only…
Jetse
  • 2,223
  • 5
  • 17
  • 12
74
votes
2 answers

store output of system command into a variable in r

I am executing the following command in R : system("ls ") I need to store the output of the above command in some R variable. Is there a way to do the same??
user1021713
  • 2,133
  • 8
  • 27
  • 40
73
votes
2 answers

How to pass system properties to a jar file

I have a main class that expects certain properties that I pass using the -D option. I can access this in my IDE by sending them as VM options. I package this application into a jar file using Maven and when I try the following: java -jar myjar.jar…
arjunj
  • 1,436
  • 1
  • 16
  • 28
1
2 3
99 100