3

I can not get geth commands to work. I read a lot of information that says use "this" command for "this". Such as --upgradedb or --removedb. These are not working. They reason im trying these different commands is something is going on with my ethminer not working for anything and Im trying to figure out what files I can delete that might be causing a problem or be corrupt and if some geth folders or databases is causing a problem with ethminer. Also if I --remove data base does this delete the blockchain and have to download again?

1 Answer 1

2

The commands don't require the -- prefix. The options do.

From the help:

user@Kumquat:~$ geth help
NAME:
   geth - the go-ethereum command line interface

USAGE:
   geth [options] command [command options] [arguments...]

VERSION:
   1.4.10-stable

COMMANDS:
   import   import a blockchain file
   export   export blockchain into file
   upgradedb    upgrade chainblock database
   removedb Remove blockchain and state databases
   dump     dump a specific block from storage
   monitor  Geth Monitor: node metrics monitoring and visualization
   account  manage accounts
   wallet   ethereum presale wallet
   console  Geth Console: interactive JavaScript environment
   attach   Geth Console: interactive JavaScript environment (connect to node)
   js       executes the given JavaScript files in the Geth JavaScript VM
   makedag  generate ethash dag (for testing)
   gpuinfo  gpuinfo
   gpubench benchmark GPU
   version  print ethereum version numbers
   init     bootstraps and initialises a new genesis block (JSON)
   help, h  Shows a list of commands or help for one command

ETHEREUM OPTIONS:
  --datadir "/home/user/.ethereum"  Data directory for the databases and keystore
  --keystore                Directory for the keystore (default = inside the datadir)
  --networkid value         Network identifier (integer, 0=Olympic, 1=Frontier, 2=Morden) (default: 1)
...

And geth removedb will remove your blockchain. You'll have to re-download the database again.

You could try renaming your .ethereum/chaindata folder and re-download the chain. You can rename this back if necessary.

Your geth data should be OK if you are seeing messages like the following, where the block number is approximately #2074485 currently:

I0815 14:49:39.039358 core/blockchain.go:963] imported 1 block(s) (0 queued 0 ignored) including 0 txs in 8.433081ms. #2074485 [89ff2cb3 / 89ff2cb3]
I0815 14:50:00.291091 core/blockchain.go:963] imported 1 block(s) (0 queued 0 ignored) including 2 txs in 23.258293ms. #2074486 [f074d77d / f074d77d]



Update Responding To Comment Below

And geth does seem to be working fine. But ethminer isnt working for anything and I know they share some of the same folders and didnt what to try

ethminer should only be using the $HOME/.ethash directory. ethminer communicates with geth using the RPC port 8545 by default.

Supposing you started your geth instance with the command line:

geth --support-dao-fork --rpc --rpcaddr localhost --rpcport 8545 console

You hook up ethminer to geth using the command line:

ethminer -F http://localhost:8545 -G

If ethminer can communicate with geth but is still having problems, try clearing the $HOME/.ethash subdirectory.

geth should be showing you the following type of message every 15 seconds on average:

I0816 12:04:20.118923 core/blockchain.go:963] imported 1 block(s) (0 queued 0 ignored) including 20 txs in 14.503ms. #2079921 [20076720 / 20076720]
I0816 12:04:20.133206 miner/worker.go:573] commit new work on block 2079922 with 28 txs & 0 uncles. Took 14.201495ms
I0816 12:04:34.231668 core/blockchain.go:963] imported 1 block(s) (0 queued 0 ignored) including 28 txs in 17.859299ms. #2079922 [003f36c4 / 003f36c4]
I0816 12:04:34.237316 miner/worker.go:573] commit new work on block 2079923 with 4 txs & 0 uncles. Took 5.580535ms
I0816 12:05:26.380479 core/blockchain.go:963] imported 1 block(s) (0 queued 0 ignored) including 4 txs in 5.37515ms. #2079923 [56525ea3 / 56525ea3]
I0816 12:05:26.404808 miner/worker.go:573] commit new work on block 2079924 with 45 txs & 0 uncles. Took 24.273473ms

ethminer should be showing you the following type of message every 15 seconds on average:

miner  12:04:34.248|ethminer  Got work package:
miner  12:04:34.248|ethminer    Header-hash: e24359a9cddcafab4ff6a52a4b7efcd8d5461ac7b1f433f38e4eeca8002810be
miner  12:04:34.248|ethminer    Seedhash: 46862965466b5f8011ebefb35a0d1a0b7290c3ba38c11e916c74c347e00ed903
miner  12:04:34.248|ethminer    Target: 0000000000047d90c52a0ae70d0483986b92d788f7086ca6562a7820f32e8342
  ℹ  12:04:34.336|gpuminer0  workLoop 1 #46862965… #46862965…
  ℹ  12:04:34.412|gpuminer1  workLoop 1 #46862965… #46862965…
1
  • THanks. I figured out the commands. And geth does seem to be working fine. But ethminer isnt working for anything and I know they share some of the same folders and didnt what to try.
    – cdc285
    Commented Aug 16, 2016 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.