getcpu method