I have dnsmasq available on my Android (stock ROM 4.4.2 Note2) and would like to know how I can tell if it's running and what settings its currently using?
If you're rooted, go to
/system/bin/ and find
dnsmasq if it's in there. Alternatively, you can also check
/xbin (but, that's unlikely to be there).
If you managed to find one in either path - you now use a terminal emulator and type
su first and enter, then type
dnsmasq -d to see if the process will be invoked properly. It should also run with its default settings depending on how it was compiled.
I can't tell you exactly for the settings, but here's an approach that basically should work for any app:
What you will need
Alternatively, for parts of the tasks there are apps available to monitor system resources.
What to do
At the shell prompt, you can check for active processes using the
ps command. You can filter the output using
grep. Assuming you know the package name (you can find it in the app's Playstore URL, right after the
id=), and let's say it's
ps | grep "com.foobar"
would either show all processes of the
com.foobar app – or nothing (if it's not running).
As for the settings, that's not that easy to determine. Depending on the app, these are either stored in a database, in the apps "shared preferences", or in both – all those stored below
/data/data/com.foobar in our example case, which only root or the app itself has access to.
So if the device is rooted, you could try to directly access the corresponding files in
/data/data/com.foobar/shared_prefs/*, and investigate the files – using SQLite3 (or one of its GUIs) for the database files, and some XML viewer for the shared preferences.