CPU Damage Over Time
I took my Pro in to the apple store because both iStat and smcFanControl told me my computer was at 220 F and my fans were still running at 1997rpm. They reset the SMC and PRAM and ran diagnostics and stress tests and told me everything was fine. It seemed to be fixed for a few days but now my fans aren't kicking in until the CPU has reached 200 F. The fans take about 5 minutes till they hit 6200rpm and they still keep the computer running at 180-190 F. I'm not noticing any performance issues when it is running at those temps, but will that slowly damage my CPU and graphics card over time if I don't do anything about it?
There are a few people having this problem. You might want to see my post here: http://discussions.apple.com/thread.jspa?threadID=2069785&tstart=0
Also yes, really high temperatures over time will cause damage to any computer.
Similar Messages
-
Does improper xorg.conf damage monitor instantly or over time?
Self explanatory; I've read that improper settings in xorg.conf can damage your monitor. Is this something that still applies with new monitors? If so, what settings may do it (other than vertical and horizontal refresh rates)? Lastly, would improper settings ruin the monitor slowly over time, or in one hit the first time you start X?
Cheers.A friend of mine had problems like that with nVidia cards setting improper refresh rates or sth for the monitors - and it fried at least one of them. I think it has to something to do with wrong DDC settings being read out (but which can be overridden manually).
-
How do you spread CPU load over more cores?
Hi
I recently bought a macbook pro quadcore i7 because my 2007 macbook couldn't cope with the demands of Logic when using it rewired with Ableton Live, and had lots of CPU overload messages.
I am really disappointed that having spent so much money to overcome this problem, it has only slightly improved the amount of overload messages. I read the article below about how to spread CPU power over the cores, now I have 8. I still can't figure out though how to control which channels are using which core and spreading the CPU load to cores 5-8 which don't seem to be being used. Any ideas?
Can I rewire from ableton to different cores?
In my project, the 2nd core keeps overloading whilst the others are down. Is it to do with aux channels, master channels, buses etc?
Or should I upload my memory to 8GB RAM?
Thanks
Steve
Here's the article:
About core activity
Logic breaks tasks down into threads that can be assigned to a single core for execution. It's not possible to split a single thread across multiple cores, although a single core may run multiple threads at the same time. This is one reason that you may sometimes see uneven load distributions across the available cores on your computer. If one thread is very processor-intensive, the core running that thread may show much more activity than the cores running less demanding tasks. This is the main reason that you may get "Core Audio Overload" warning messages even though some of the cores on your system may not show significant activity.
To monitor Logic as it uses the cores on your system, double-click the CPU meter in the Transport area.
A window displays a meter for each core.
The same concept applies to channel strips as well. Each channel strip—and all plug-ins it contains—is processed by one core. If you are using many processor-intensive plug-ins on a single channel strip, the core running it may show heavier activity. This is especially true if you are working at high sample rates (88.2 kHz or higher).
Redistributing core loads
If you find that a single core has much higher activity, use these strategies to redistribute the load.
In the example below, there is a single Software Instrument channel strip with plug-ins routed directly to Output 1-2. The channel strip for Output 1-2 has a large number of plug-ins.
In this example there is activity on two cores: the left core is handling the Software Instrument while the next core processes the Output 1-2 channel strip. You can use routing capabilities in Logic to distribute the load to more cores without changing the sound, as in the next image.
The resulting signal chain is Inst 1 > Aux 1 > Aux 2 > Out 1-2, as shown in this table:
Channel strip
Input
Output
Inst 1
Bus 1
Aux 1
Bus 1
Bus 2
Aux 2
Bus 2
Out 1-2
Also, the first four plug-ins have moved from Output 1-2 to Aux 1 and the remaining four plug-ins to Aux 2.
After adjusting the volumes to the respective channel strips appropriately, the result sounds identical, but now the load is distributed among four cores instead of two. You can use this concept to redistribute plug-ins from Audio channel strips, Software Instruments, Auxes, and Outputs (as in this example).
In the image above, there is still a very heavy load on a single core, even though it's using the routing described above. Notice the Inst 1 channel strip is selected. When a Software Instrument track is selected in the Arrange window, Logic enters "Live Input Mode". In this mode, Logic turns on every plug-in in the channel strip's signal path so the channel strip can be played live from a MIDI controller. All of this must be handled by a single thread and therefore just one core. It's a good idea to keep a track that uses an Audio channel strip selected in the Arrange window, unless you're actively playing or recording to a Software Instrument.OS X Snow Leopard introduced Grand Central, where the OS will distribute the load better to more cores, however it takes time for software to adapt to these changes and make a rewrite of the codebase and test it out, Apple's included.
-
Is there a way to speed up a Mac (similar to de-fragging on a PC)? Mine has gotten slower and slower over time.
When memory/disc comes close to full would that have an effect on performance? How should I determine what programs/software to remove and free space?Things You Can Do To Resolve Slow Downs
If your computer seems to be running slower here are some things you can do:
Start with visits to: OS X Maintenance - MacAttorney;
The X Lab: The X-FAQs;
The Safe Mac » Mac Performance Guide;
The Safe Mac » The myth of the dirty Mac;
Mac maintenance Quick Assist.
Boot into Safe Mode then repair your hard drive and permissions:
Repair the Hard Drive and Permissions Pre-Lion
Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
Repair the Hard Drive - Lion/Mountain Lion/Mavericks
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
Restart your computer normally and see if this has helped any. Next do some maintenance:
For situations Disk Utility cannot handle the best third-party utility is Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
Suggestions for OS X Maintenance
OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep. Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger. These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
Helpful Links Regarding Malware Protection
An excellent link to read is Tom Reed's Mac Malware Guide.
Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
See these Apple articles:
Mac OS X Snow Leopard and malware detection
OS X Lion- Protect your Mac from malware
OS X Mountain Lion- Protect your Mac from malware
About file quarantine in OS X
If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
Troubleshooting Applications
I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line. Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
Basic Backup
For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
1. A Time Machine preferences panel as part of System Preferences;
2. A Time Machine application located in the Applications folder. It is
used to manage backups and to restore backups. Time Machine
requires a backup drive that is at least twice the capacity of the
drive being backed up.
Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
1. Carbon Copy Cloner
2. Get Backup
3. Deja Vu
4. SuperDuper!
5. Synk Pro
6. Tri-Backup
Visit The XLab FAQs and read the FAQ on backup and restore. Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
Referenced software can be found at MacUpdate.
Additional Hints
Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
Check for applications that may be hogging the CPU:
Pre-Mavericks
Open Activity Monitor in the Utilities folder. Select All Processes from the Processes dropdown menu. Click twice on the CPU% column header to display in descending order. If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar. Click on the Force Quit button to kill the process. See if that helps. Be sure to note the name of the runaway process so you can track down the cause of the problem.
Mavericks and later
Open Activity Monitor in the Utilities folder. Select All Processes from the View menu. Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order. If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar. Click on the Force Quit button to kill the process. See if that helps. Be sure to note the name of the runaway process so you can track down the cause of the problem.
Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file. -
Setup a new Macbook Pro to minimize application slowdowns over time
Hi,
I own a dual G5 2.0 tower which has become (over time) extremely slow...it seems I get the spinning beachball all too often, but have plenty of ram and HD space. Even when opening JPEGS.
I am buying a macbook pro this w/e and was wondering what the best way to setup the new computer because I want to use it as an HD FCP editing station (on location), but from time to time use applications like aquisition and bittorrent which really seem to bog the system down. I assume not using migration assistant, and re-installing from scratch is a good idea.
Forgive what may be basic questions, but do I setup a partition initially on the internal drive (and have 2 system folders or something similar?) or will simply setting up different users to access only certain applications help? (I assume not).
Obviously a concern is the laptop drive is small 160GB 7200RPM but I can guess most of the time I will be running a GRAID for the video editing files, and bigger aperture library (I may have a small select library on the internal drive to show clients and friends "on the go")
I really appreciate any tips or suggestions and hope that my questions make sense. I realize I want the computer to "do it all" but can't afford it to be strictly an editing station, as I'll be selling the G5 to help pay for the macbook pro!
Much appreciated,
Brian Broz
Vancouver, CanadaUnderstand that P2P software operates under the premise that you will have many connections to peers. Each network connection requires memory and CPU cycles to operate properly without timing out the connection or slowing down transfers. In fact, the faster the Internet connection and the more peers connected to your P2P application, the more resource intensive the P2P software will be. You will want to either close the P2P application or tweak it's settings so that it uses minimal bandwidth and resources while you are performing other tasks on your MBP. Try Azureus for torrents as it allows you to tweak settings very nicely.
Partitioning your hard drive will accomplish nothing in this case. Better to invest in an external FW800 drive for the improving performance while video editing or where you need additional storage. -
Diffrence between cpu and elapse time in tkprof
Hi All
i found huge diffrence between cpu and elapsed time in tkprof. can you please advice me on this issue.
>call count cpu elapsed disk query current rows
==================================================
Parse 1 0.12 1.36 2 11 0 0
Execute 1 14.30 720.20 46548 190520 205 100
Fetch 0 0.00 0.00 0 0 0 0
======================================================
total 2 14.42 721.56 46550 190531 205 100
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 173 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times waited Max. Wait Total Waited
===========================================
db file sequential read 46544 0.49 632.12
db file scattered read 1 0.00 0.00
my select statement
SELECT cst.customer_id> ,DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.trx_date) / COUNT(cr.deposit_date))) avgdays
> ,DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.due_date) / COUNT(cr.deposit_date))) avgdayslate
> ,NVL(SUM(DECODE(SIGN(cr.deposit_date - ps.due_date),1, 1, 0)), 0) newlate
> ,NVL(SUM( DECODE(SIGN(cr.deposit_date - ps.due_date),1, 0, 1)), 0) newontime
>
> FROM ar_receivable_applications_all ra
> ,ar_cash_receipts_all cr
> ,ar_payment_schedules_all ps
> ,zz_ar_customer_summary_all cst
> WHERE ra.cash_receipt_id = cr.cash_receipt_id
> AND ra.apply_date BETWEEN ADD_MONTHS(SYSDATE, -12) AND SYSDATE
> AND ra.status = 'APP'
> AND ra.display = 'Y'
> AND ra.applied_payment_schedule_id = ps.payment_schedule_id
> AND ps.customer_id = cst.customer_id
> AND NVL(ps.receipt_confirmed_flag,'Y') = 'Y'
> group by cst.customer_id ;
Thanks,
Anuuser653066 wrote:
Hi All
i found huge diffrence between cpu and elapsed time in tkprof. can you please advice me on this issue.
call count cpu elapsed disk query current rows
================================================================================
Parse 1 0.12 1.36 2 11 0 0
Execute 1 14.30 720.20 46548 190520 205 100
Fetch 0 0.00 0.00 0 0 0 0
================================================================================
total 2 14.42 721.56 46550 190531 205 100
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 173 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times waited Max. Wait Total Waited
===========================================================================
db file sequential read 46544 0.49 632.12
db file scattered read 1 0.00 0.00
SELECT cst.customer_id
,DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.trx_date) / COUNT(cr.deposit_date))) avgdays
,DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.due_date) / COUNT(cr.deposit_date))) avgdayslate
,NVL(SUM(DECODE(SIGN(cr.deposit_date - ps.due_date),1, 1, 0)), 0) newlate
,NVL(SUM( DECODE(SIGN(cr.deposit_date - ps.due_date),1, 0, 1)), 0) newontime
FROM ar_receivable_applications_all ra
,ar_cash_receipts_all cr
,ar_payment_schedules_all ps
,zz_ar_customer_summary_all cst
WHERE ra.cash_receipt_id = cr.cash_receipt_id
AND ra.apply_date BETWEEN ADD_MONTHS(SYSDATE, -12) AND SYSDATE
AND ra.status = 'APP'
AND ra.display = 'Y'
AND ra.applied_payment_schedule_id = ps.payment_schedule_id
AND ps.customer_id = cst.customer_id
AND NVL(ps.receipt_confirmed_flag,'Y') = 'Y'
group by cst.customer_id ; Toon Koppelaars seems to have pinpointed the problem. Where are the 74 seconds unaccounted for seconds (I might have calculated it incorrectly, but I arrived at 88.08 seconds of unaccounted for time: 721.56 total - 1.36 parse - 632.12 db file sequential reads)?
It is interesting that the maximum wait for a single block read reported by TKPROF is 0.49 seconds - this might be an indication of excessive competition for the server's CPU - processes are waiting in the CPU run queue, and therefore not on the CPU. As Toon indicated, 632.12 of the 721.56 seconds were spent waiting for single block reads to complete with 46,544 blocks read. Note also that the query executed at dep=1, and TKPROF may be providing misleading information about what actually happened during those executions. An example of misleading information:
CREATE TABLE T11 (
C1 NUMBER,
C2 VARCHAR2(30));
CREATE TABLE T12 (
C1 NUMBER,
C2 VARCHAR2(30));
CREATE TABLE T13 (
C1 NUMBER,
C2 VARCHAR2(30));
CREATE TABLE T14 (
C1 NUMBER,
C2 VARCHAR2(30));
CREATE OR REPLACE TRIGGER HPM_T11 AFTER
INSERT OR DELETE OR UPDATE OF C1 ON T11
REFERENCING OLD AS OLDDATA NEW AS NEWDATA FOR EACH ROW
BEGIN
IF INSERTING THEN
INSERT INTO T12
SELECT
ROWNUM,
DBMS_RANDOM.STRING('A',25)
FROM
DUAL
CONNECT BY
LEVEL <= 100;
END IF;
END;
CREATE OR REPLACE TRIGGER HPM_T12 AFTER
INSERT OR DELETE OR UPDATE OF C1 ON T12
REFERENCING OLD AS OLDDATA NEW AS NEWDATA FOR EACH ROW
BEGIN
IF INSERTING THEN
INSERT INTO T13
SELECT
ROWNUM,
DBMS_RANDOM.STRING('A',25)
FROM
DUAL
CONNECT BY
LEVEL <= 100;
END IF;
END;
CREATE OR REPLACE TRIGGER HPM_T13 AFTER
INSERT OR DELETE OR UPDATE OF C1 ON T13
REFERENCING OLD AS OLDDATA NEW AS NEWDATA FOR EACH ROW
BEGIN
IF INSERTING THEN
INSERT INTO T14
SELECT
ROWNUM,
DBMS_RANDOM.STRING('A',25)
FROM
DUAL
CONNECT BY
LEVEL <= 100;
END IF;
END;
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'MY_TEST_FIND_ME2';
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SET TIMING ON
INSERT INTO T11 VALUES (1,'MY LITTLE TEST CASE');
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';The partial TKPROF output:
INSERT INTO T11
VALUES
(1,'MY LITTLE TEST CASE')
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 8 0 0
Execute 1 0.00 0.00 0 9788 29 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 9796 29 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=9788 pr=7 pw=0 time=0 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID : 6asaf110fgaqg
INSERT INTO T12 SELECT ROWNUM, DBMS_RANDOM.STRING('A',25) FROM DUAL CONNECT
BY LEVEL <= 100
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.04 0.09 0 2 130 100
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.04 0.09 0 2 130 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56 (recursive depth: 1)
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=9754 pr=7 pw=0 time=0 us)
100 COUNT (cr=0 pr=0 pw=0 time=0 us)
100 CONNECT BY WITHOUT FILTERING (cr=0 pr=0 pw=0 time=0 us)
1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)
SQL ID : db46bkvy509w4
INSERT INTO T13 SELECT ROWNUM, DBMS_RANDOM.STRING('A',25) FROM DUAL CONNECT
BY LEVEL <= 100
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 100 1.31 1.27 0 93 10634 10000
Fetch 0 0.00 0.00 0 0 0 0
total 101 1.31 1.27 0 93 10634 10000
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56 (recursive depth: 2)
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=164 pr=0 pw=0 time=0 us)
100 COUNT (cr=0 pr=0 pw=0 time=0 us)
100 CONNECT BY WITHOUT FILTERING (cr=0 pr=0 pw=0 time=0 us)
1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)
SQL ID : 6542yyk084rpu
INSERT INTO T14 SELECT ROWNUM, DBMS_RANDOM.STRING('A',25) FROM DUAL CONNECT
BY LEVEL <= 100
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 10001 41.60 41.84 0 8961 52859 1000000
Fetch 0 0.00 0.00 0 0 0 0
total 10003 41.60 41.84 0 8961 52859 1000000
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56 (recursive depth: 3)
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=2 pr=0 pw=0 time=0 us)
100 COUNT (cr=0 pr=0 pw=0 time=0 us)
100 CONNECT BY WITHOUT FILTERING (cr=0 pr=0 pw=0 time=0 us)
1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
log file switch completion 2 0.07 0.07
********************************************************************************In the above note that the "INSERT INTO T11" is reported as completing in 0 seconds, but it actually required roughly 42 seconds - and that would be visible by manually reviewing the resulting trace file. Also note that the log file switch completion wait was not reported for the "INSERT INTO T11" even though it impacted the execution time.
Back to the possibility of CPU starvation causing lost time. Another test with an otherwise idle server, followed by a second test with the same server having 240 other processes fighting for CPU resources (a simulated load).
ALTER SYSTEM FLUSH BUFFER_CACHE;
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'MY_TEST_QUERY_NO_LOAD';
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SET TIMING ON
SELECT
COUNT(*)
FROM
T14;
SELECT
SYSDATE
FROM
DUAL;
SQL> SELECT
2 COUNT(*)
3 FROM
4 T14;
COUNT(*)
1000000
Elapsed: 00:00:01.37With no load the COUNT(*) completed in 1.37 seconds. The TKPROF output looks like this:
SQL ID : gy8nw9xzyg3bj
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
NVL(SUM(C2),:"SYS_B_1")
FROM
(SELECT /*+ NO_PARALLEL("T14") FULL("T14") NO_PARALLEL_INDEX("T14") */
:"SYS_B_2" AS C1, :"SYS_B_3" AS C2 FROM "T14" SAMPLE BLOCK (:"SYS_B_4" ,
:"SYS_B_5") SEED (:"SYS_B_6") "T14") SAMPLESUB
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.01 0.84 523 172 1 1
total 3 0.01 0.84 523 172 1 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56 (recursive depth: 1)
Rows Row Source Operation
1 SORT AGGREGATE (cr=172 pr=523 pw=0 time=0 us)
8733 TABLE ACCESS SAMPLE T14 (cr=172 pr=523 pw=0 time=0 us cost=2 size=12 card=1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 3 0.02 0.04
db file parallel read 1 0.31 0.31
db file scattered read 52 0.03 0.47
SQL ID : 96g93hntrzjtr
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,
sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,
spare1, spare2, avgcln
from
hist_head$ where obj#=:1 and intcol#=:2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.06 2 2 0 0
total 3 0.00 0.06 2 2 0 0
Misses in library cache during parse: 0
Optimizer mode: RULE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID HIST_HEAD$ (cr=2 pr=2 pw=0 time=0 us)
0 INDEX RANGE SCAN I_HH_OBJ#_INTCOL# (cr=2 pr=2 pw=0 time=0 us)(object id 413)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 2 0.02 0.04
SELECT
COUNT(*)
FROM
T14
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 1 1 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.03 0.43 6558 6983 0 1
total 4 0.03 0.44 6559 6984 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56
Rows Row Source Operation
1 SORT AGGREGATE (cr=6983 pr=6558 pw=0 time=0 us)
1000000 TABLE ACCESS FULL T14 (cr=6983 pr=6558 pw=0 time=0 us cost=1916 size=0 card=976987)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 1 0.02 0.02
SQL*Net message to client 2 0.00 0.00
db file scattered read 111 0.02 0.38
SQL*Net message from client 2 0.00 0.00Note that TKPROF reported that it only required 0.44 seconds for the query to execute while the SQL*Plus timing indicate that it required 1.37 seconds for the SQL statement to execute. The SQL optimization (parse) with dynamic sampling query accounted for the remaining time, yet TKPROF provided no indication that this was the case.
Now the query with 240 other processes competing for CPU time:
ALTER SYSTEM FLUSH BUFFER_CACHE;
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'MY_TEST_QUERY_WITH_LOAD';
SELECT COUNT(*) FROM T14;
SELECT
SYSDATE
FROM
DUAL;
SQL> SELECT COUNT(*) FROM T14;
COUNT(*)
1000000
Elapsed: 00:00:59.03The query this time required just over 59 seconds. The TKPROF output:
SQL ID : gy8nw9xzyg3bj
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
NVL(SUM(C2),:"SYS_B_1")
FROM
(SELECT /*+ NO_PARALLEL("T14") FULL("T14") NO_PARALLEL_INDEX("T14") */
:"SYS_B_2" AS C1, :"SYS_B_3" AS C2 FROM "T14" SAMPLE BLOCK (:"SYS_B_4" ,
:"SYS_B_5") SEED (:"SYS_B_6") "T14") SAMPLESUB
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.28 423 69 0 1
total 3 0.00 0.28 423 69 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 56 (recursive depth: 1)
Rows Row Source Operation
1 SORT AGGREGATE (cr=69 pr=423 pw=0 time=0 us)
8733 TABLE ACCESS SAMPLE T14 (cr=69 pr=423 pw=0 time=0 us cost=2 size=12 card=1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file scattered read 54 0.01 0.27
db file sequential read 2 0.00 0.00
SQL ID : 7h04kxpa13w1x
SELECT COUNT(*)
FROM
T14
call count cpu elapsed disk query current rows
Parse 1 0.00 0.03 1 1 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.06 58.71 6551 6983 0 1
total 4 0.06 58.74 6552 6984 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 56
Rows Row Source Operation
1 SORT AGGREGATE (cr=6983 pr=6551 pw=0 time=0 us)
1000000 TABLE ACCESS FULL T14 (cr=6983 pr=6551 pw=0 time=0 us cost=1916 size=0 card=976987)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 1 0.02 0.02
SQL*Net message to client 2 0.00 0.00
db file scattered read 110 1.54 58.59
SQL*Net message from client 1 0.00 0.00Note in the above that the max wait for the db file scattered read is 1.54 seconds due to the extra CPU competition - about 3 times longer than your max wait for a single block read. On your database platform with single block reads, it might be possible that the time in the CPU run queue is not always counted in the db file sequential read wait time or the CPU wait time - what if your operating system is slow at returning timing information to the database instance due to CPU saturation - this might explain the 74 (or 88) lost seconds.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.
Edited by: Charles Hooper on Aug 28, 2009 10:26 AM
Fixing formatting problems -
Audio performance deteriorating over time until Mavericks reinstall
I'm on the latest Mavericks, maxed-out 12-core Mac Pro. I use Steinberg Nuendo as my main audio DAW. It works like a dream... for a while... But after a few weeks it starts slowing down until Nuendo is almost unusable. Larger projects which normally run just fine become unworkable or very sluggish because they just overload the CPU, as if I was working with a 5 year old computer. This issue specifically targets audio performance, whether I use internal audio or my audio interface (UAD Apollo).
I've tried removing/uninstalling all non essential drivers, extensions etc, and reinstalled/updated everything I can't work without to the latest versions. I've tried unplugging everything except 1 monitor, keyboard, mouse and USB authorization sticks. Nothing makes a difference. It's like there's a virus that progressively slows down my system, but I have found no virus on my system, at least via MacKeeper.
Here is my temporary solution: Every few weeks I reinstall Mavericks (right now 10.9.3) via the Apple online recovery system (Command-R on startup). The problem goes away completely and my Mac Pro is blazing fast again... For a few weeks, until audio performance deteriorates and I have to reinstall Mavericks again. Apple tech support originally advised me to reinstall Mavericks on top of itself, and I was really happy the problem was fixed, but I didn't know it would keep sneaking in over and over again.
This is the third time I have to reinstall Mavericks via online Recovery, and I am still baffled as to what could possibly get worse over time in this manner, and also specifically target audio performance! It's like some sort of cache is getting filled-up somewhere and overloading some of the computer's functions over time. Whatever this is, it gets reset during a reinstall.
If anyone has any ideas or hunches, they would be really appreciated!
PS: I've posted the same issue in the "Mac Pro" section to make sure I get the most coverage. I don't expect too many answers since not too many people have the Mac Pro yet and this is a targeted inquiry.Make sure you got all the parts and pieces.
MacKeeper Removal
Activity Monitor - Mavericks
Activity Monitor in Mavericks has significant changes
Performance Guide
Why is my computer slow
Why your Mac runs slower than it should
Slow Mac After Mavericks
Things you can do to resolve slowdowns see post by Kappy -
Is there any advantage in using Vault over Time Machine?
Hi all,
Yesterday I imported around 6000+ pictures from iPhoto and consolidated them into my Aperture library. After much re-organisation into projects, folders etc. I decided to update my backup Vault to preserve all my hard work. The Vault is located on a connected external drive with plenty of spare storage. I had previously backed up successfully to the vault when there was only a few dozen pictures in my library.
After initiating the Vault update process I then left it to get on it (and to have dinner and then watch the football...) and after several hours was dismayed to find that the process appeared to be stuck at just over 50% completion. It was obvious that no further progress was being made.
I was also concerned that there appeared to be no mechanism to cancel the process and the only course of action I could take was to apply a Force Quit against Aperture - not something that I care to do, if I can possibly avoid it.
After a rudimentary search of this community I saw that several others had experienced the same problem - although some suggested that a fix had been applied in recent versions (although I am running the latest version).
Given this, I'm reluctant to use the Vault again - particularly as there appears to be no means of cancelling a stuck job. I do however use Time Machine, so my questions are:
1) Do I really need to use Vault if I have Time Machine making regular backups of my Aperture library to an external drive?
2) Does using Vault give any advantages over Time Machine?
3) Is anyone else experiencing this problem with the current version of Aperture (v3.3)?
4) Is there anyway of cancelling a stuck Vault update other than the sledgehammer approach of Force Quit?
Thanks in anticipation,
Simon.SImon,
Vault and Time Machine address different needs. Probably you will want to have both.
The advantage of Time Machine: incremental backups of previous versions, very compact storage. And you can integrate it into your regular backup of the whole system and include the regular masters as well. But the disadvantage: Time Machine decides for you, what will be deleted, if the backup drives get full. You do not have control over what will be saved and what not from the previous versions.
The advantage of vaults: You can make full backups of your library for well defined moments in time - snapshots of important states. I'd create a vault, whenever I make a major upgrade of the system at least.
Is there anyway of cancelling a stuck Vault update other than the sledgehammer approach of Force Quit?
If the graphical user interface is unresponsive, like when updating a vault, you can use the Terminal to send the "termination signal" to Aperture: Sometimes this will succeed, even if the "Quit" button does not work:
Look for the Process ID of Aperture in the Activity Monitor (launch Applications > Utilities > Activity Monitor" and click the CPU heading. This will bring Aperture close to the top of the list. Make a note of the PID number in the first column, in this case 66550.
Launch a Terminal window and enter the following command:
kill -TERM 66550 (insert Aperture's PID instead of 66550)
This will send the "Software Termination Signal - TERM to Aperture, the same as pressing the "Quit" button should do, but send it directly, and not from the GUI that is unresponsive. This way I always succeded in cancelling a vaul update without force quitting. Not all processes can be terminated this way, however. The Terminal.app is also in the Applications > Utilities folder.
Regards
Léonie -
I have sometimes had movies degrade over time. I have one specifically that I am looking at now that is a gray scale microscopy movie was made in 2006 with Cinepak and looked fine when first made. Now the first frame and several other frames (but not all) are dramatically posterized to a uniform gray. Sometimes I have seen a different degradation where you get blocks of pixels that turn uniform gray was if you reduced the resolution of the image. Is this a Cinepak issue or a Quicktime issue? Is there any way of recovering the data or preventing it from happening?
Grandpa,
Sadly, writable media DOES degrade over time - sometimes after a year or so. Cheap media (and sometime not-so cheap media), improper storage conditions (hot, sunlight, high humidity) and high burn errors during burning (result of high burn speeds over 4x) can all contribute to degradation.
Roxio's new Toast Titanium 8 now includes the ability to recover data from some damaged discs - it's probably worth trying.
Problems with the long term storage of digial images remain digital imaging's 'diry little secret' - see http://www.frontiernet.net/~fshippey/archiving.htm for an article I wrote on the subject.
F Shippey -
Using Measurement Studio 6.0 for VB but from within a Visual Studio 2005 CSharp app, the components used are the AxCWGPIB ? that interface to the GPIB bus
everything works except over time, like 1 hour, it becomes noticeably slower, after 10 hours the cpu useage is peaked around 100%, each transfer takes a few seconds. Am searching for any issues with this activeX, any leads appreciated.
rebooting the system makes it run faster, problem seems linked to the GPIB interface/driver which is the National Instruments/Measurement studio component that appears as AxCWGPIB
thanks for any assistanceyes thanks, I disabled the data logging and ran the tests that only did the gpib I/O. doing this, it would increase in cpu useage much faster than if everything gets run. Ive scoured the code for possible memory leaks
Is there supposed to be some special way to call and manage the Interop.CWInstrumentControlLibrary.dll or ?? from the C# form world?
the documentation is extremely limited, but I put the control into the form1, then make calls from the code. nothing to indicate that more is necessary, so what else is supposed to be done?
is there a difference between the cwgpib control in the dotnet version of Measurement Studio? or is it the same exact v1.4 for version 6.0? -
Hey guys, i have a one year old Mac desktop which has become incredibly slow over time. Strange thing is that I have not downloaded anything save for install Windows for Mac. Storage wise the bulk of my info is stored on hard external drives. Can someow
Hardware Information:
iMac - model: iMac11,2
1 3.2 GHz Intel Core i3 CPU: 2 cores
4 GB RAM
Video Information:
ATI Radeon HD 5670 - VRAM: 512 MB
System Software:
Mac OS X 10.6.8 (10K549) - Uptime: up 0:2:53:43
Disk Information:
WDC WD1001FALS-40Y6A0 disk0 : (931,51 GB)
(null) (disk0s1) <not mounted>: 200 MB
Macintosh HD (disk0s2) /: 931,19 GB (894,98 GB free)
OPTIARC DVD RW AD-5680H
USB Information:
Apple Inc. iPad
Apple Internal Memory Card Reader
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple, Inc. Keyboard Hub
Apple, Inc Apple Keyboard
Apple Computer, Inc. IR Receiver
Apple Inc. Built-in iSight
FireWire Information:
Kernel Extensions:
Problem System Launch Daemons:
[failed] com.apple.suhelperd.plist
[not loaded] org.samba.winbindd.plist
Problem System Launch Agents:
[failed] com.apple.Kerberos.renew.plist
Launch Daemons:
[loaded] com.adobe.fpsaud.plist
[loaded] com.microsoft.office.licensing.helper.plist
[loaded] com.rim.BBDaemon.plist
[loaded] com.zeobit.MacKeeper.AntiVirus.plist
Launch Agents:
[loaded] com.rim.BBAlbumArtCacher.plist
[loaded] com.rim.BBLaunchAgent.plist
User Launch Agents:
[loaded] com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae.plist
[loaded] com.zeobit.MacKeeper.Helper.plist
User Login Items:
iTunesHelper
BlackBerry Desktop Software
Bluetooth File Exchange
Garmin ANT Agent
Dropbox
3rd Party Preference Panes:
Flash Player
Internet Plug-ins:
AdobePDFViewer.plugin
AdobePDFViewerNPAPI.plugin
Flash Player.plugin
FlashPlayer-10.6.plugin
GarminGpsControl.plugin
iPhotoPhotocast.plugin
JavaAppletPlugin.plugin
QuickTime Plugin.plugin
SharePointBrowserPlugin.plugin
User Internet Plug-ins:
Bad Fonts:
None
Top Processes by CPU:
Top Processes by Memory: -
ITunes sync bug causes space on iPod/iPhone to be gradually lost over time
This topic pertains to iTunes for Windows version 10.1.1 and most likely all prior versions. At the time of this writing 10.1.1 is the latest version.
I have clearly identified a bug with the procedure iTunes uses specifically to copy Music over to the iPod and iPhone units. A detailed description with steps to reproduce follows, but first the summary: Space is gradually wasted by iTunes erroneously copying certain tracks twice! The 2nd copy is not recorded in the itunesDB file, and space wasted on these duplicate tracks is counted under "Other" in the iTunes capacity screen. It is impossible to ever retrieve this space from the portable device without doing a factory restore on the Summary screen, which of course will also wipe out all your Apps, Videos, Photos, Music, etc at the same time. Hardly an ideal workaround!!
Details:
When several tracks are to be copied to the portable device; either an iPod or an iPhone, and I have successfully reproduced this on both an iPod nano 5th Generation and an iPhone 4, sometimes a track is accidentally copied twice while, one of the selected tracks isn't copied at all. The user will notice when this occurs, that during their sync, one of their songs just seems to be missing. Syncing again will then copy the track which was missed during the last sync, but unfortunately, the 2nd copy of the track that was erroneously duplicated remains. The track which is duplicated appears in the hidden folder on your iPod file system as both the AAAA.mp3 filename structure and the <track name>.mp3 file name. Oddly enough, when this bug occurs, the itunesDB does not associate to the AAAA.mp3 like it normally would, but to the <track name>.mp3 and the AAAA.mp3 file is just wasted space on your device which cannot be recovered without manually deleting this file (a task which is impossible on an iPhone without hacking the device).
It is easy to reproduce this. This is very obvious if you start with an empty, new iPod. Sync a bunch of tracks to your iPod (the more the better), in fact this cannot happen if you only sync 1 track at a time, then check to see if the number of tracks is equal to the number of tracks that should be there. i.e. did the sync seem to just miss 1 or 2 tracks?
Make sure "Enable disk mode" is checked for your device, and browse to (Drive Letter):\iPod_Control\Music\ and you will eventually find that exact number of files which have actual track names instead of the standard AAAA.mp3 type filename. Next, in iTunes, remove ALL songs and any other forms of audio (such as podcasts), from the device. Your music folder techincally should now be empty, but as you browse through the hidden Music folder in the device, you will stumble upon a couple of files that remain. These are the orphaned files I've been talking about.
The effect:
Over time, with repeated additions and removal of songs from one's device, these files accumulate. The iPod owner, none the wiser, will start to wonder why "Other" in the iTunes capacity display is continuing to grow. I was highly suspicious after cleaning out my iPod entirely, that "Other" was still showing 1.6GB!! I browsed through the filesystem wondering why which led me to discover tons of various music files in the music folder which shouldn't have been there (after all, iTunes shows no music stored on this device).
The Fix:
Some sort of bug is causing this erroneous duplicate copy to be generated, and then the database to actually reference the erroneous copy instead of the AAAA.mp3 copy. One workaround iTunes could actually build in some sort of enumeration function that scans all of it's internal F## folders in the Music folder looking for these orphaned files, and simply erase them if they are not contained in the itunesDB. Pushing out this type of behavior into a new iTunes release would also fix the problem for all the people who've already racked up GBs of wasted space as that space would suddenly become available again for apps, tracks, and other files.Two steps forward - one step back.
Thanks to insight from others here I enabled disk use and went to [drive letter]/iPod/control/music
There I saw a long list of folders called F00, F01, F02 etc.
In my case there were 49 of them with roughly 400 files in each folder.
The bulk of the files were named ABCD.mp4 down to ZYXW.mp4.
In each of the fifty folders were, as predicted above, a handful of song files labeled as such - ie borntorun.mp3 or iseered.mp4
I opened each and every one of the folders, deleted the files with real names and synced the pod.
On my 120 GB the yellow "other" fell dramatically, down to under 1 GB. Which is under 1% of the total. Not great but acceptable.
So far, so good.
Now that I had fresh space I set about adding new songs to the pod.
Imagine my disappointment when I rechecked the F00 to F49 folders and saw that song name files had crept back in. Not as many, and I was able to delete them quickly and keep "other" under 1 GB. But still. It's like having crab grass or rodents.
Is there any hint that iTunes might address the underlying cause?
In the gripping process of deleting four or five files from each folder I noted that some specific files came up again and again. Just for laughs I'm going to delete and re-add those songs in case that helps. -
Why does iTunes use 100% CPU all the time, hogging my Macbook Air?
Decided to post this here instead of the iTunes forum, since it might be related to hardware too.
New owner of a 2011 13" Macbook Air, core i5 based.
My problem started about 1 week ago, after it had run out of power completely one day. At the first boot after that it was incredibly sluggish, totally unusable. After waiting for 5 minutes and still being unresponsive, I turned it off and then back on. Then it booted fine. HOWEVER, ever since that time I noticed the following behavior:
- iTunes stays at 100% + CPU all the time, mostly between 100-120%. Even if it's not playing. Even when I deleted the entire library and left it empty.
- iStats reports CPU idle between 50-65%. However, CPU temperature is still about 55 degrees C (which, I think, is far less than what it should have been with 50% idle cpu). I can confirm the low temperature by touching the chasis.
- the cursor freezes and jumps every few seconds, making the mac kind of unusable with iTunes open.
This has been going on for 2 weeks now. The problem goes away every now and then (iTunes sometimes goes back to regular CPU usage of 3-5%), but most of the time it's there.
Help!
P.S.
Mac OX X 10.7.2
iTunes 10.5.2Cee Pee You, is a OS modification. Apple recommends that you un-install these prior to a OS update because Apple makes changes to the OS all the time which breaks programs like these.
I avoid Unsanity LLC products like the plague. Notice the company is a Limited Liability Corporation (LLC), which makes it difficult to sue the company in case of a defective or malicious product. So the risk using their products is all yours. Their APE framework modules have been used for malicious purposes because anyone can write a module that uses the APE framework.
I also avoid installing anything that requires a administrative password unless I completely trust the source, like Apple mostly. That admin password is the key to the security of our machines, not to be given out lightly or carelessly.
You'll have to contact Unsanity's [email protected] because what I'm reading online is it's very difficult to remove as it doesn't "exist".
http://forums.macosxhints.com/archive/index.php/t-3616.html -
Amount of key presses a user makes over time - BPM
Hi,
Im working on a small program that needs to get the amount of keypresses a user makes over time.
Basically its for calcuating the BPM a user is inputting. So a uers taps a beat for 5 seconds and the amount of tap is saved and multiplied by 12 to get the Users BPM.
So far i have this:
package Version1;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.*;
public class muTap extends JFrame implements KeyListener, ActionListener {
JTextArea display;
* main - the main method
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
theGUI();
* muTap constructor
public muTap(String name) {
super(name);
* theGUI - creates the gui for muTap
public static void theGUI() {
muTap frame = new muTap("muTap");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Set up the content pane.
frame.addComponents();
//Display the window.
frame.pack();
frame.setVisible(true);
* adComponents - adds gui components to muTap
public void addComponents() {
JButton button = new JButton("Start");
button.addActionListener(this);
display = new JTextArea();
display.setEditable(false);
display.addKeyListener(this);
JScrollPane scrollPane = new JScrollPane(display);
scrollPane.setPreferredSize(new Dimension(375, 125));
getContentPane().add(scrollPane, BorderLayout.PAGE_START);
getContentPane().add(button, BorderLayout.PAGE_END);
public void keyTyped(KeyEvent e) {
//Do Nothing
/** Handle the key pressed event from the text field. */
public void keyPressed(KeyEvent e) {
//TODO call the getBPMfromKboard() method
taps++;
System.out.println("Tap: " + taps);
/** Handle the key released event from the text field. */
public void keyReleased(KeyEvent e) {
//Do Nothing
/** Handle the button click. */
public void actionPerformed(ActionEvent e) {
//Do Nothing
//initialCountdown(3, "Start Tapping Fool");
countDown(3);
* countDown - a simple countdown timer for use when getting users input.
* @param time amount of time to count down from
* @return true when timer ends.
public static int taps;
public void countDown(final int time) {
taps = 0;
final Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask()
int i = time;
public void run() {
i--;
String s = Integer.parseInt(i); // error because of this i.
display.setText(s);
if (i < 0) {
timer.cancel();
if(time == 3)
display.setText("Start Tapping");
countDown(5);
else if(time == 5)
display.setText("Number of taps: " + taps);
//System.out.print("Number of taps" +taps);
}, 0, 1000);
}But i get errors when i try running it:
"Exception in thread "Timer-1" java.lang.RuntimeException: Uncompilable source code"
It doesnt seem to like me parsing int to string here:
String s = Integer.parseInt(i); Any ideas? or if youve got suggestions on another way to do it it'd be much appreiated.
Thanks!Korvanica wrote:
It doesnt seem to like me parsing int to string here:
String s = Integer.parseInt(i);
Yikes, you've got that bit of code backward, there partner.
You use Integer.parseInt to parse a String into an int, not the other way around.
If you want to change an int to a String, do
String s = String.valueOf(i)or you can use the various formatters out there. -
I ended up with 3 Apple IDs over time. How can I get it down to one account?
I ended up with 3 Apple IDs over time. When I sink my iPad, some apps won't sync because the app was purchased under a different account?
How can I get it down to one account and be able to sync all of my iTunes purchases (apps, music, etc.) on my iPad and iPhone?
This is driving me crazy! grrrr. :-)
I have .me; .mac and .icloud accounts.
- Dave
Running OS X 10.8.5 (Mountain Lion) on iMac, using iPad 4 (64GB) and iPhone 5.Thanks. I was afraid of that. Darn Apple....we use Apple products because they are elegant and easy to use, why can't apple simplify the ID issues??? :-)
Thanks for the reply.
Maybe you are looking for
-
When syncing to iTunes, it says that my phone needs much more space (over 600MB) to sync. According to the bar at the bottom of iTunes in the phone summary screen, I have nearly 4GB of memory left. Whats up with this?
-
Using JHS tables and hashing with salt algorithms for Weblogic security
We are going to do our first enterprise ADF/JHeadstart application. For security part, we are going to do the following: 1. We will use JHS tables as authentication for ADF security. 2. We will use JAAS as authentication and Custom as authorization.
-
Reports Staff movements from one org unit to another org unit
Dear experts, Is there any standard reports to get staff movements from one org unit to another units. Thanks in advance
-
Is it possible to save your iPhone conversations directly to your notes?
I need to save a conversation me and my girlfriend had so I can put some of it in a scrapbook for her, only problem is when I tried to use a 3rd party software online, it said my phone was corrupt or something. Someone please help me!!!
-
I have a requirement to do a substitution for project settlements for certain projects and specific WBS elements for eg., for projects which start with letter S or M the posting need to happen for a GL a/c "XXXXXXXXX" and for projects which starts w