Active Topics

 



Notices


Reply
Thread Tools
Posts: 130 | Thanked: 48 times | Joined on Jan 2010 @ Hampshire, UK
#111
Still unsure why i cannot get this to work. every version i install all it seems to do is disable the default clock.

With latest version i can access the settings menu (within personalisation) but no matter what clock type i change to nothing seems to appear?

Confusing
 
Posts: 306 | Thanked: 106 times | Joined on Feb 2010
#112
My question got lost in the discussion so i will reiterate:

"Is it possible tohave two clocks at the same time with one showing the local timezone and the second one showing the remote timezone?"
__________________
------------------------------------------------------------------
Voice choppy on sip calls
Please vote for bug number 10388
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#113
@Mentalist Traceur: How are you going about getting the cpu/wifi information? I am not sure whether I am doing it efficiently (especially CPU measurement).
Ummm, I honestly don't know if I'm doing it efficiently. I pulled open cpumem applet's source code and that's where I've been figuring it out from. I just got memory working, using /proc/meminfo, which I may be using a step or two more for than CPUMEM applet does, but it works just fine right now, at least, visibly (though without the update-screen-only-if-value-changed-enough part just yet).

However, I have not done the same for CPU (doing it right now). The thing is I've been trying to understand the information in /proc/stat, and I am starting to have a creeping suspicion that all this time, all of us using load and cpumem applets have been getting slightly inaccurate CPU stats.

As I understand it, /proc/stat has an idle time value in the FOURTH number (fifth string because it has 'cpu' at the front, index 4, if you split that line of /proc/stat). Disk I/O is on the FIFTH number... if I'm not wrong. And that's what CPUMEM accesses for calculating processor idle time from moment to moment - the fifth number of that string (index 5, again since "cpu" is on index 0 if you split it).

So, have CPUMEM and Load applets just been telling us the changes in disk i/o the entire time, instead of idle processes? I can't think of a good test for how to fill up ram without running into an I/O operation, so frak if I can think of how to verify that. Anything that runs that much CPU probably requires some I/O, and anything that needs lots of I/O probably requires a bunch of processing.

To be clear, the /proc/stat file's first line looks like this:
"cpu 259246 7001 60190 34250993 137517 772 0 0"
The problem is the red is the actual idle time, while the green is what the cpumem applet's source code says it's using.

Furthermore, I'm finding this:
http://colby.id.au/node/39
http://www.murga-linux.com/puppy/vie...0161809#272677
(Both links point to different edits of the same shell script) Which suggests that the proper way of calculating CPU usage is more complicated than that.

So... how are you getting CPU for your version?

@rajil.s: Yes, but you'd have to code the clock style yourself, or get one of us to do it for you. I don't think it would be that easy to set the time zone with just the settings, but it could be 'hard'-coded (in so far as uncompiled python is ever hard-coded) into the clock style. So one reports your time zone time, the other reports your time +/- X hours.

- Edit (again) -

Oh, and since I am a newb and might just be completely wrong, here's how the code looks for the relevant part in cpumem (it's in C):

Code:
#define CPUFILE "/proc/stat"
	gint curU, curN, curIO, curI;
	gint deltaU, deltaN, deltaIO, deltaI;
	int load, idle;
	GError *error = NULL;
	gchar *contents;
	gsize lenght;
	gchar **splits;

	if (!g_file_get_contents (CPUFILE, &contents, &lenght, &error)) {
		fprintf (stderr, "ERR: can't read file %s: %s\n", CPUFILE, error->message);
		g_error_free (error);
		return 0;
	}
	
	splits = g_strsplit_set (contents, " ",  -1);

	sscanf(splits[2], "%d", &curU);
	sscanf(splits[3], "%d", &curN);
	sscanf(splits[4], "%d", &curIO);
	sscanf(splits[5], "%d", &curI);
	
	g_strfreev (splits);
	g_free (contents);
    
	idle = (curI - priv->lastI);
	if (idle == 0) load = 100;
	else load = 100-idle;
	if (load>100) load = 0;
	deltaU = curU - priv->lastU;
	deltaN = curN - priv->lastN;
	deltaIO = curIO - priv->lastIO;
	deltaI = curI - priv->lastI;
	priv->lastU = curU;
	priv->lastN = curN;
	priv->lastIO = curIO;
	priv->lastI = curI;
The thing to note is that none of the variables starting with delta, and non of the variables ending with U, N, or IO, are used. It only uses the curl and priv->lastl variables. The others just don't get used in the code, even though they are set each time.

Last edited by Mentalist Traceur; 2010-12-30 at 10:09. Reason: Looked up name of last poster.
 
CasTTeLLo's Avatar
Posts: 335 | Thanked: 51 times | Joined on May 2010
#114
Originally Posted by Mentalist Traceur View Post
Found it!
Code:
rm [-f] /home/user/.cache/launch/com.nokia.controlpanel.pvr
This is for getting rid of that annoying control panel screen-shot that Hildon always fails to refresh at the right time. (The -f is in brackets because I don't need it when I run the command. Qwerty12 - who all proper TMO members should know was a hacking pimp of awesome - posted it with the -f, so it might be necessary for some people *shrug*.)

CasTTeLLo. In my experience, just running apt-get update, once or at most twice, solves things. I don't really know how, or why - every time I get this problem I really feel like I don't know what the hell to do, but I tend to redo the same stuff reboot, apt-get update, remove and re-add repositories... It tends to fix itself if you do those enough times. I really don't know why though.
after keep trying and trying, now it's working perfectly....thanks for ur "gut"....as usual, Problem solved!!
__________________
Best Regard,

CasTTeLLo
 

The Following User Says Thank You to CasTTeLLo For This Useful Post:
ayazpak's Avatar
Posts: 101 | Thanked: 149 times | Joined on Jun 2010 @ United Arab Emirates
#115
This is nice, good work but after reboot clock setting went to its defaut setting, unable to save my personal settings.
 
CasTTeLLo's Avatar
Posts: 335 | Thanked: 51 times | Joined on May 2010
#116
Originally Posted by ayazpak View Post
This is nice, good work but after reboot clock setting went to its defaut setting, unable to save my personal settings.
try this via xterminal :

apt-get update
apt-get upgrade

if it's not solved try to reinstall the plugin and make sure u install the correct ver...gud luck!
__________________
Best Regard,

CasTTeLLo
 

The Following 2 Users Say Thank You to CasTTeLLo For This Useful Post:
ayazpak's Avatar
Posts: 101 | Thanked: 149 times | Joined on Jun 2010 @ United Arab Emirates
#117
Originally Posted by CasTTeLLo View Post
try this via xterminal :

apt-get update
apt-get upgrade

if it's not solved try to reinstall the plugin and make sure u install the correct ver...gud luck!
Thanks for quick reply, ok I will try and post the result here
 
Posts: 1,729 | Thanked: 388 times | Joined on Jan 2010 @ Canada
#118
awesome plugin! looks like im not going to go back in time using the stock clock?
__________________
if i did help you, just click "Thanks" on the lower right of my post. thanks!

"The best way to break a Spell is to prevent it from being cast in the first place"

N900: 1000/1150mhz; sampling_rate 15; up_threshold 150000;
 
Posts: 569 | Thanked: 462 times | Joined on Jul 2010 @ USA
#119
Latest version working nicely here.
 
ayazpak's Avatar
Posts: 101 | Thanked: 149 times | Joined on Jun 2010 @ United Arab Emirates
#120
Originally Posted by CasTTeLLo View Post
try this via xterminal :

apt-get update
apt-get upgrade

if it's not solved try to reinstall the plugin and make sure u install the correct ver...gud luck!
Thanks again, I got it according to your instructions.
 

The Following User Says Thank You to ayazpak For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:15.