当前位置:首页 » 以太坊知识 » 以太坊钱包怎么获得CPU

以太坊钱包怎么获得CPU

发布时间: 2021-06-12 16:43:13

㈠ 挖以太坊需要什么cpu

挖矿不需要很好的cpu吧?cpu算法挖矿太低了,挖矿主要是用显卡挖的

㈡ 怎么获得CPU的信息

Android获取cpu和内存信息、网址的代码如下:
/** 获取用户硬件信息 */

public static String getMobileInfo() {
//StringBuffer sb = new StringBuffer();
JSONObject mbInfo = new JSONObject();

//通过反射获取用户硬件信息
try {

Field[] fields = Build.class.getDeclaredFields();
for (Field field : fields) {
// 暴力反射,获取私有信息
field.setAccessible(true);
String name = field.getName();
String value = field.get(null).toString();
//sb.append(name + "=" + value);
//sb.append("\n");
mbInfo.put(name, value);
}
} catch (Exception e) {
e.printStackTrace();
}

//return sb.toString();
return mbInfo.toString();
}

static public String getCpuString(){
if(Build.CPU_ABI.equalsIgnoreCase("x86")){
return "Intel";
}

String strInfo = "";
try
{
byte[] bs = new byte[1024];
RandomAccessFile reader = new RandomAccessFile("/proc/cpuinfo", "r");
reader.read(bs);
String ret = new String(bs);
int index = ret.indexOf(0);
if(index != -1) {
strInfo = ret.substring(0, index);
} else {
strInfo = ret;
}
}
catch (IOException ex){
ex.printStackTrace();
}

return strInfo;
}

static public String getCpuType(){
String strInfo = getCpuString();
String strType = null;

if (strInfo.contains("ARMv5")) {
strType = "armv5";
} else if (strInfo.contains("ARMv6")) {
strType = "armv6";
} else if (strInfo.contains("ARMv7")) {
strType = "armv7";
} else if (strInfo.contains("Intel")){
strType = "x86";
}else{
strType = "unknown";
return strType;
}

if (strInfo.contains("neon")) {
strType += "_neon";
}else if (strInfo.contains("vfpv3")) {
strType += "_vfpv3";
}else if (strInfo.contains(" vfp")) {
strType += "_vfp";
}else{
strType += "_none";
}

return strType;
}

/**
* @hide
* @return
*/
public static CPUInfo getCPUInfo() {
String strInfo = null;
try
{
byte[] bs = new byte[1024];
RandomAccessFile reader = new RandomAccessFile("/proc/cpuinfo", "r");
reader.read(bs);
String ret = new String(bs);
int index = ret.indexOf(0);
if(index != -1) {
strInfo = ret.substring(0, index);
} else {
strInfo = ret;
}
}
catch (IOException ex)
{
strInfo = "";
ex.printStackTrace();
}

CPUInfo info = parseCPUInfo(strInfo);
info.mCPUMaxFreq = getMaxCpuFreq();

return info;
}

private final static String kCpuInfoMaxFreqFilePath = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
private static int getMaxCpuFreq() {
int result = 0;
FileReader fr = null;
BufferedReader br = null;
try {
fr = new FileReader(kCpuInfoMaxFreqFilePath);
br = new BufferedReader(fr);
String text = br.readLine();
if (text != null) {
result = Integer.parseInt(text.trim());
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fr != null)
try {
fr.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (br != null)
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

return result;
}

public static class CPUInfo{
public CPUInfo(){

}

public static final int CPU_TYPE_UNKNOWN = 0x00000000;
public static final int CPU_TYPE_ARMV5TE = 0x00000001;
public static final int CPU_TYPE_ARMV6 = 0x00000010;
public static final int CPU_TYPE_ARMV7 = 0x00000100;

public static final int CPU_FEATURE_UNKNOWS = 0x00000000;
public static final int CPU_FEATURE_VFP = 0x00000001;
public static final int CPU_FEATURE_VFPV3 = 0x00000010;
public static final int CPU_FEATURE_NEON = 0x00000100;

public int mCPUType;
public int mCPUCount;
public int mCPUFeature;
public double mBogoMips;
public long mCPUMaxFreq;
}

/**
*
* @param cpuInfo
* @return
* @hide
*/
private static CPUInfo parseCPUInfo(String cpuInfo) {
if (cpuInfo == null || "".equals(cpuInfo)) {
return null;
}

CPUInfo ci = new CPUInfo();
ci.mCPUType = CPUInfo.CPU_TYPE_UNKNOWN;
ci.mCPUFeature = CPUInfo.CPU_FEATURE_UNKNOWS;
ci.mCPUCount = 1;
ci.mBogoMips = 0;

if (cpuInfo.contains("ARMv5")) {
ci.mCPUType = CPUInfo.CPU_TYPE_ARMV5TE;
} else if (cpuInfo.contains("ARMv6")) {
ci.mCPUType = CPUInfo.CPU_TYPE_ARMV6;
} else if (cpuInfo.contains("ARMv7")) {
ci.mCPUType = CPUInfo.CPU_TYPE_ARMV7;
}

if (cpuInfo.contains("neon")) {
ci.mCPUFeature |= CPUInfo.CPU_FEATURE_NEON;
}

if (cpuInfo.contains("vfpv3")) {
ci.mCPUFeature |= CPUInfo.CPU_FEATURE_VFPV3;
}

if (cpuInfo.contains(" vfp")) {
ci.mCPUFeature |= CPUInfo.CPU_FEATURE_VFP;
}

String[] items = cpuInfo.split("\n");

for (String item : items) {
if (item.contains("CPU variant")) {
int index = item.indexOf(": ");
if (index >= 0) {
String value = item.substring(index + 2);
try {
ci.mCPUCount = Integer.decode(value);
ci.mCPUCount = ci.mCPUCount == 0 ? 1 : ci.mCPUCount;
} catch (NumberFormatException e) {
ci.mCPUCount = 1;
}
}
} else if (item.contains("BogoMIPS")) {
int index = item.indexOf(": ");
if (index >= 0) {
String value = item.substring(index + 2);
}
}
}

return ci;
}

/**
* 获取设备内存大小值
* @return 内存大小,单位MB
*/
public static long getTotalMemory() {
String str1 = "/proc/meminfo";
String str2;
String[] arrayOfString;
long initial_memory = 0;
try {
FileReader localFileReader = new FileReader(str1);
BufferedReader localBufferedReader = new BufferedReader(localFileReader, 8192);
str2 = localBufferedReader.readLine();
if (str2 != null) {
arrayOfString = str2.split("\\s+");
initial_memory = Integer.valueOf(arrayOfString[1]).intValue()/1024;
}
localBufferedReader.close();
return initial_memory;
}
catch (IOException e)
{
return -1;
}
}

/**
* @hide
* @return
*/
public CPUInfo getCPUInfo() {
String strInfo = null;
try
{
byte[] bs = new byte[1024];
RandomAccessFile reader = new RandomAccessFile("/proc/cpuinfo", "r");
reader.read(bs);
String ret = new String(bs);
int index = ret.indexOf(0);
if(index != -1) {
strInfo = ret.substring(0, index);
} else {
strInfo = ret;
}
}
catch (IOException ex)
{
strInfo = "";
ex.printStackTrace();
}

CPUInfo info = parseCPUInfo(strInfo);
info.mCPUMaxFreq = getMaxCpuFreq();

return info;
}

/**
* 获取android CPU类型
*
* @return String CPU类型
*/
public static String getCpuModel(){
String cpu_model = "";

CPUInfo in = getCPUInfo();

if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV5TE) == CPUInfo.CPU_TYPE_ARMV5TE)
cpu_model="armv5";
else if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV6) == CPUInfo.CPU_TYPE_ARMV6)
cpu_model="armv6";
else if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV7) == CPUInfo.CPU_TYPE_ARMV7)
cpu_model="armv7";
else
cpu_model="unknown";
return cpu_model;
}

/**
* 获取android CPU特性
*
* @return String CPU特性
*/
public static String getCpuFeature(){
String cpu_feature = "";

CPUInfo in = getCPUInfo();

if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_NEON ) == CPUInfo.CPU_FEATURE_NEON)
cpu_feature="neon";
else if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_VFP ) == CPUInfo.CPU_FEATURE_VFP)
cpu_feature="vfp";
else if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_VFPV3 ) == CPUInfo.CPU_FEATURE_VFPV3)
cpu_feature="vfpv3";
else
cpu_feature="unknown";
return cpu_feature;
}

/**
* 获取ip地址
*
* @param mContext Context
* @return ip地址字符串
*/
public static String getIpAddress(Context mContext) {
String ipAddress = null;
try {
for (Enumeration en = NetworkInterface
.getNetworkInterfaces(); en.hasMoreElements();) {
NetworkInterface intf = en.nextElement();
for (Enumeration enumIpAddr = intf
.getInetAddresses(); enumIpAddr.hasMoreElements();) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress()) {
ipAddress = inetAddress.getHostAddress().toString();
}
}
}
} catch (SocketException ex) {
return null;
}
if (DEBUG) {
Log.d(TAG, "ip address:" + ipAddress);
}
return ipAddress;
}

㈢ 以太坊钱包里的以太坊币,如何交易

可以选择在数字货币交易所进行交易,市场上目前比较主流的数字货币交易所分别为币安、火币、比特网。

㈣ 以太坊挖矿,需要什么硬件配置

你好,根据我的经验来说,1.首先搭机架,然后固定显卡,再将CPU和风扇、内存、SSD硬盘插在主板的插槽内并连好电源和主板电源。

希望我的建议可以帮助到你,谢谢!

㈤ 是不是所有的数字货币都可以转到以太坊钱包

不是的,是需要钱包支持的币种才可以,钱包不支持的币种转进去是会导致 币的丢失的,每个币的钱包充币地址都是不一样的,而且钱包的是一个小的平台,感觉没有zb安全些,不过有额可以使用一些私人钱包

㈥ 以太币为什么不用CPU

原因很简单,算力决定一切。
挖矿需要的就是强大的运算能力,而且是大量重复的运算。虽然CPU的性能强大,但是由于逻辑过于复杂,更适合复杂的逻辑运算,并不适合现在挖矿这种简单无脑的但是运算量巨大的工作。而显卡,尤其是AMD的显卡,由于其自身设计的多处理器特性以及天生适合大量暴力运算等特点,非常适合挖矿这种“重体力活”。
所以现在挖矿,导致显卡价格暴涨,就这个原因。

㈦ 以太坊发币全流程

你需要下载一个以太坊钱包

㈧ 以太坊挖矿,需要什么硬件配置,求详细清单,

你好,根据我的经验来说,1.首先搭机架,然后固定显卡,再将CPU和风扇、内存、SSD硬盘插在主板的插槽内并连好电源和主板电源。

希望我的建议可以帮助到你,谢谢!

热点内容
收到假eth币 发布:2025-10-20 08:58:16 浏览:973
暗黑破坏神2eth打孔 发布:2025-10-20 08:42:58 浏览:105
BTC和CBT是一样的吗 发布:2025-10-20 08:42:57 浏览:233
华硕trx40Pro供电 发布:2025-10-20 08:33:26 浏览:432
晒人民币编号的朋友圈 发布:2025-10-20 08:25:32 浏览:687
doge格式 发布:2025-10-20 08:02:00 浏览:382
以太坊会爆发吗 发布:2025-10-20 08:01:59 浏览:772
一台比特币矿机的功率 发布:2025-10-20 07:39:24 浏览:925
trx辅助带 发布:2025-10-20 07:35:29 浏览:48
比特币哈希值有多少位 发布:2025-10-20 07:31:20 浏览:633