Sponsored Content
Operating Systems HP-UX How to find processor frequency Post 18654 by PxT on Monday 1st of April 2002 01:03:56 PM
Old 04-01-2002
This bit of perl magic should do it (answer in Mhz):

Code:
#!/usr/contrib/bin/perl

    local($PSTAT, $PSTAT_PROCESSOR) = (239, 10);        # pstat_getprocessor
    local($struct_pst_processor) = ("L30");
    local($cpu_info, $cpu_ticks);

    $cpu_info = "\0" x 120;
    syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);

    ($cpu_ticks) = (unpack($struct_pst_processor, $cpu_info))[26];

        print $cpu_ticks/10000 . "\n";

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

To find processor speed & memory in HP Unix 10.2

I have a D series HP server with HP UNIX 10.20 as the OS. How will I obtain the processor speed and memory of the machine. I have 'root' privileges. (4 Replies)
Discussion started by: augustinep
4 Replies

2. UNIX Desktop Questions & Answers

Where can I find a Unix OS that will run on a 386 processor?

Hey, can anyone recommend a URL (or website) where I can download a basic (or old) UNIX OS that will run on an ancient laptop that has a 386 processor, 4MB of RAM and a 40MB harddrive? Your help and suggestions are much appreciated! :confused: (4 Replies)
Discussion started by: methudrez
4 Replies

3. HP-UX

Frequency of CPU's on HP-UX server

Does anyone know if there is a command in hp-ux to find out the frequencies of the cpus on the server. I know in sun the command is /usr/sbin/psrinfo -v (on Sun)??Thanks (3 Replies)
Discussion started by: lnineill
3 Replies

4. AIX

LPAR processor/virtual processor settings

Question is on setting of Physical and Virtual processors for LPARs to make proper use of virtualization capabilities. Environment is a 8-way p570 with 4 LPARs. lparVIO1 and lparVIO2: AIX 5300-04-01 Mode/Type= Shared-SMT/Capped Minimum Processors= 0.10 Desired Processors= 0.50 Maximum... (1 Reply)
Discussion started by: guttew
1 Replies

5. AIX

Processor and processor core

Guys... Hows it going??? I have been going through the hardware spec of IBM system p systems.. and here i am confused for IBM Power 520 Express it says Processor cores: One, two or four 64-bit 4.2 GHz POWER6 with AltiVec™ SIMD and Hardware Decimal Floating-Point acceleration ... (1 Reply)
Discussion started by: balaji_prk
1 Replies

6. Solaris

out of frequency

:cool: after installing solaris 10 5/08/09 directory the computer rebooting then the massage "out of frequency" appear.i want a solution first second my main board is GA-MA780G UD3H (14 Replies)
Discussion started by: medo2008
14 Replies

7. AIX

Find the feature code of the installed processor card on my p550

Guys Does anyone know how to find the feature code of the installed processor card on my p550? Through AIX or HMC. Basically I need to find the processor card type. Thanks in advance Bala (2 Replies)
Discussion started by: balaji_prk
2 Replies

8. Shell Programming and Scripting

Calculating cumulative frequency

Hi, I have a file containing the frequency's of an element sorted in ascending order. The file looks something like this: #Element Frequency 1 1 2 1 3 1 4 1 5 1 6 ... (5 Replies)
Discussion started by: sajal.bhatia
5 Replies

9. Shell Programming and Scripting

Bash - Same frequency

Hi, Could anyone help me with the following question, if I have two colums (names and frequency) as follows in a file called name.txt Michael 1 Jones 1 Ben 2 Rebeca 4 David 1 and I want to use bash script called freqnames.sh that takes one argument (name) and the output should be... (3 Replies)
Discussion started by: jboy
3 Replies

10. Shell Programming and Scripting

find frequency

Hi, I have a file with more than 1 million records.. Each row has a distance number.. I want to know how many times is each number occurring from min to max number.. 2 5 120 208 7 28 45 6 33 120 7 208 so onn.. output 0-0 (4 Replies)
Discussion started by: Diya123
4 Replies
CSF(9)							   BSD Kernel Developer's Manual						    CSF(9)

NAME
CSF -- The NetBSD common scheduler framework SYNOPSIS
#include <sys/sched.h> void sched_rqinit(void); void sched_setup(void); void sched_cpuattach(struct cpu_info *); void sched_tick(struct cpu_info *); void sched_schedclock(lwp_t *); bool sched_curcpu_runnable_p(void); lwp_t * sched_nextlwp(void); void sched_enqueue(lwp_t *, bool); void sched_dequeue(lwp_t *); void sched_nice(struct proc *, int); void sched_proc_fork(struct proc *, struct proc *); void sched_proc_exit(struct proc *, struct proc *); void sched_lwp_fork(lwp_t *); void sched_lwp_exit(lwp_t *); void sched_setrunnable(lwp_t *); void sched_print_runqueue(void (*pr)(const char *, ...)); void sched_pstats_hook(struct proc *, int); void sched_pstats(void *arg); pri_t sched_kpri(lwp_t *); void resched_cpu(lwp_t *); void setrunnable(); void schedclock(lwp_t *); void sched_init(void); DESCRIPTION
CSF provides a modular and self-contained interface for implementing different thread scheduling algorithms. The different schedulers can be selected at compile-time. Currently, the schedulers available are sched_4bsd(9), the traditional 4.4BSD thread scheduler, and sched_m2(9) which implements a SVR4/Solaris like apporach. The interface is divided into two parts: A set of functions each scheduler needs to implement and common functions used by all schedulers. Scheduler-specific functions The following functions have to be implemented by the individual scheduler. Scheduler initialization void sched_cpuattach(struct cpu_info *) Per-CPU scheduler initialization routine. void sched_rqinit(void) Initialize the scheduler's runqueue data structures. void sched_setup(void) Setup initial scheduling parameters and kick off timeout driven events. Runqueue handling Runqueue handling is completely internal to the scheduler. Other parts of the kernel should access runqueues only through the following functions: void sched_enqueue(lwp_t *, bool) Place an LWP within the scheduler's runqueue structures. void sched_dequeue(lwp_t *) Remove an LWP from the scheduler's runqueue structures. lwp_t * sched_nextlwp(void) Return the LWP that should run the CPU next. bool sched_curcpu_runnable_p(void) Indicate if there is a runnable LWP for the current CPU. void sched_print_runqueue(void (*pr)(const char *, ...)) Print runqueues in DDB. Core scheduler functions void sched_tick(struct cpu_info *) Periodically called from hardclock(9). Determines if a reschedule is necessary, if the running LWP has used up its quantum. void sched_schedclock(lwp_t *) Periodically called from schedclock() in order to handle priority adjustment. Priority adjustment void sched_nice(struct proc *, int) Recalculate the process priority according to its nice value. General helper functions void sched_proc_fork(struct proc *, struct proc *) Inherit the scheduling history of the parent process after fork(). void sched_proc_exit(struct proc *, struct proc *) Charge back a processes parent for its resource usage. void sched_lwp_fork(lwp_t *) LWP-specific version of the above void sched_lwp_exit(lwp_t *) LWP-specific version of the above void sched_setrunnable(lwp_t *) Scheduler-specific actions for setrunnable(). void sched_pstats_hook(struct proc *, int) Scheduler-specific actions for sched_pstats(). Common scheduler functions pri_t sched_kpri(lwp_t *) Scale a priority level to a kernel priority level, usually for an LWP that is about to sleep. void sched_pstats(void *) Update process statistics and check CPU resource allocation. inline void resched_cpu(lwp_t *) Arrange for a reschedule. void setrunnable(lwp_t *) Change process state to be runnable, placing it on a runqueue if it is in memory, awakening the swapper otherwise. void schedclock(lwp_t *) Scheduler clock. Periodically called from statclock(). void sched_init(void) Initialize callout for sched_pstats() and call sched_setup() to initialize any other scheduler-specific data. CODE REFERENCES
The CSF programming interface is defined within the file sys/sys/sched.h. Functions common to all scheduler implementations are in sys/kern/kern_synch.c. The traditional 4.4BSD scheduler is implemented in sys/kern/sched_4bsd.c. The M2 scheduler is implemented in sys/kern/sched_m2.c. SEE ALSO
mi_switch(9), preempt(9), sched_4bsd(9), sched_m2(9) HISTORY
The CSF appeared in NetBSD 5.0. AUTHORS
The CSF was written by Daniel Sieger <dsieger@NetBSD.org>. BSD
September 2, 2009 BSD
All times are GMT -4. The time now is 04:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy