Search found 9 matches

by danielheth
Mon Dec 08, 2014 11:38 pm
Forum: Linux
Topic: Is User a member of administrators group
Replies: 3
Views: 2354

Is User a member of administrators group

is there a way to tell if the user running my program is an administrator or not? On windows i simply call IsUserAdmin_(), but looking for the linux equivalent...
by danielheth
Tue Dec 02, 2014 7:17 pm
Forum: Linux
Topic: CPU Throttling
Replies: 7
Views: 3937

Re: CPU Throttling

yes please. When using it on the mac version of my app it appears in the activity monitor as a non-responsive app... although the cpu and memory are clearly being used and my log continues to work.
by danielheth
Tue Dec 02, 2014 5:09 pm
Forum: Linux
Topic: Is 64bit
Replies: 2
Views: 2365

Re: Is 64bit

Found my answer in another thread... http://www.forums.purebasic.com/english/viewtopic.php?f=19&t=58314


CompilerIf #PB_Compiler_OS = #PB_OS_Windows
vName = vName + "for Windows"
CompilerElseIf #PB_Compiler_OS = #PB_OS_Linux
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
vName = vName ...
by danielheth
Tue Dec 02, 2014 5:05 pm
Forum: Linux
Topic: Is 64bit
Replies: 2
Views: 2365

Is 64bit

I'm creating a cross platform application and thus compiling on Windows, Mac, Linux 32bit and Linux 64bit. The windows and mac version is compiled as 32bit... and the only reason to have a linux 64bit is so i don't have to force my users to install 32bit libraries on their linux 64bit machines. Now ...
by danielheth
Mon Dec 01, 2014 11:12 pm
Forum: Linux
Topic: CPU Throttling
Replies: 7
Views: 3937

Re: CPU Throttling

I've been playing with running a ps and finding my pid/process to see what it is reporting as my cpu usage. Then if beyond my "limit", i run a "delay" which should pause my app long enough to drop the cpu usage. Wondering if there is something better than that.
by danielheth
Mon Dec 01, 2014 7:34 pm
Forum: Linux
Topic: Non-Windows Process ID (PID)
Replies: 2
Views: 2430

Re: Non-Windows Process ID (PID)

That worked perfectly thank you!!
by danielheth
Mon Dec 01, 2014 7:31 pm
Forum: Linux
Topic: Process List
Replies: 0
Views: 2595

Process List

I have the following which will provide me with a list of processes currently running, their pid, ppid, cpu and command... is there any better way?


;-- CHECK RUNNING PROCESS --
Protected vCompiler = RunProgram("ps", "-axo pid,ppid,%cpu,command", "/bin", #PB_Program_Open | #PB_Program_Read ...
by danielheth
Mon Dec 01, 2014 5:17 pm
Forum: Linux
Topic: Non-Windows Process ID (PID)
Replies: 2
Views: 2430

Non-Windows Process ID (PID)

I need to discover the PID for my non-windows application. There are many examples for windows, but i can't find one specific to non-windows.
by danielheth
Mon Dec 01, 2014 5:16 pm
Forum: Linux
Topic: CPU Throttling
Replies: 7
Views: 3937

CPU Throttling

I need to develop throttling for my application under non-windows OS's. We have CPU throttling implemented on windows, but now we need to add this non-windows feature.
Anyone have ideas on how to accomplish CPU throttling on non-windows operating systems?