Getting the modulation of a particular upstream via SNMP is a little tricky, it is not hard but it is more complex than it sounds.
First you need the ifIndex of your upstream channel, and the upstream is divided into two parts a physical channel and a logical channel, you need the ifIndex of the logical channel
you can run show iftable upstream_logic to show the ifIndexes of all upstream logical channels if you need to find a specific one.
Once you have the logical channel ifIndex you need to snmpget docsIfUpChannelModulationProfile and docsIfUpChannelType from the docsIfUpstreamChannelTable.
this will get you the docsIfModIndex and docsIfUpChannelType of the channel, which you can look up in the docsIfCmtsModulationTable. If you grab this table it will look something like this:
You will notice that for each docsIfModIndex in the table there are 4-5 rows, this is because this table also has a secondary index, which is docsIfCmtsModIntervalUsageCode and this is where it gets a little tricky, if you are using a TDMA channel (docsis 1.x) you want to look for the longData docsIfCmtsModIntervalUsageCode (6), as this determines the modulation that Customer data uses to traverse the network, if you are using a ATDMA channel (docsis 2.0+) you will want to look at the advPhyLongData (8) row.
so now that you know what rows you need you can just grab the individual value from that row instead of the whole table
Getting the modulation of a particular upstream via SNMP is a little tricky, it is not hard but it is more complex than it sounds.
First you need the ifIndex of your upstream channel, and the upstream is divided into two parts a physical channel and a logical channel, you need the ifIndex of the logical channel
you can run show iftable upstream_logic to show the ifIndexes of all upstream logical channels if you need to find a specific one.
Once you have the logical channel ifIndex you need to snmpget docsIfUpChannelModulationProfile and docsIfUpChannelType from the docsIfUpstreamChannelTable.
e.g.,
snmpget -v2c -c [comm] [ip] DOCS-IF-MIB::docsIfUpChannelModulationProfile.[ifIndex]
snmpget -v2c -c [comm] [ip] DOCS-IF-MIB::docsIfUpChannelType.[ifIndex]
this will get you the docsIfModIndex and docsIfUpChannelType of the channel, which you can look up in the docsIfCmtsModulationTable. If you grab this table it will look something like this:
snmptable -Cr 200 -Cf , -Ci -OUx -v2c -c [comm] [IP] DOCS-IF-MIB::docsIfCmtsModulationTable
SNMP table: DOCS-IF-MIB::docsIfCmtsModulationTable
index,docsIfCmtsModControl,docsIfCmtsModType,docsIfCmtsModPreambleLen,docsIfCmtsModDifferentialEncoding,docsIfCmtsModFECErrorCorrection,docsIfCmtsModFECCodewordLength,docsIfCmtsModScramblerSeed,docsIfCmtsModMaxBurstSize,docsIfCmtsModGuardTimeSize,docsIfCmtsModLastCodewordShortened,docsIfCmtsModScrambler,docsIfCmtsModByteInterleaverDepth,docsIfCmtsModByteInterleaverBlockSize,docsIfCmtsModPreambleType,docsIfCmtsModTcmErrorCorrectionOn,docsIfCmtsModScdmaInterleaverStepSize,docsIfCmtsModScdmaSpreaderEnable,docsIfCmtsModScdmaSubframeCodes,docsIfCmtsModChannelType,docsIfCmtsModStorageType
1.request,active,qpsk,64,false,0,16,338,0,16,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
1.initialRanging,active,qpsk,640,false,5,34,338,0,48,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
1.periodicRanging,active,qpsk,384,false,5,34,338,0,48,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
1.shortData,active,qpsk,84,false,6,75,338,13,16,true,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
1.longData,active,qpsk,96,false,8,220,338,0,16,true,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
2.request,active,qpsk,64,false,0,16,338,0,16,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
2.initialRanging,active,qpsk,640,false,5,34,338,0,48,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
2.periodicRanging,active,qpsk,384,false,5,34,338,0,48,false,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
2.shortData,active,qam16,168,false,6,75,338,7,16,true,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
2.longData,active,qam16,192,false,8,220,338,0,16,true,true,1,0,unknown,false,0,false,0,tdma,nonVolatile
3.request,active,qpsk,104,false,0,16,338,0,16,false,true,1,1536,qpsk0,false,0,false,0,atdma,nonVolatile
3.initialRanging,active,qpsk,640,false,5,34,338,0,48,false,true,1,1536,qpsk0,false,0,false,0,atdma,nonVolatile
3.periodicRanging,active,qpsk,640,false,5,34,338,0,48,false,true,1,1536,qpsk0,false,0,false,0,atdma,nonVolatile
3.advPhyShortData,active,qam64,104,false,12,75,338,6,16,true,true,1,1536,qpsk1,false,0,false,0,atdma,nonVolatile
3.advPhyLongData,active,qam64,104,false,16,220,338,0,16,true,true,1,1536,qpsk1,false,0,false,0,atdma,nonVolatile
4.request,active,qpsk,64,false,0,16,338,0,16,false,true,1,1536,qpsk0,false,0,false,0,tdmaAndAtdma,nonVolatile
4.initialRanging,active,qpsk,640,false,5,34,338,0,48,false,true,1,1536,qpsk0,false,0,false,0,tdmaAndAtdma,nonVolatile
4.periodicRanging,active,qpsk,384,false,5,34,338,0,48,false,true,1,1536,qpsk0,false,0,false,0,tdmaAndAtdma,nonVolatile
4.shortData,active,qam16,168,false,6,75,338,7,16,true,true,1,1536,qpsk1,false,0,false,0,tdmaAndAtdma,nonVolatile
4.longData,active,qam16,192,false,8,220,338,0,16,true,true,1,1536,qpsk1,false,0,false,0,tdmaAndAtdma,nonVolatile
4.advPhyShortData,active,qam64,104,false,12,75,338,6,16,true,true,1,1536,qpsk1,false,0,false,0,tdmaAndAtdma,nonVolatile
4.advPhyLongData,active,qam64,104,false,16,220,338,0,16,true,true,1,1536,qpsk1,false,0,false,0,tdmaAndAtdma,nonVolatile
5.request,active,qpsk,64,false,0,16,338,1,0,false,true,0,0,qpsk0,false,1,true,2,scdma,nonVolatile
5.initialRanging,active,qpsk,640,false,5,34,338,0,0,false,true,0,0,qpsk0,false,1,false,2,scdma,nonVolatile
5.periodicRanging,active,qpsk,512,false,5,34,338,0,0,false,true,0,0,qpsk0,false,1,false,2,scdma,nonVolatile
5.advPhyShortData,active,qam128,64,false,5,33,338,12,0,true,true,0,0,qpsk0,true,1,true,128,scdma,nonVolatile
5.advPhyLongData,active,qam128,64,false,10,156,338,0,0,true,true,0,0,qpsk0,true,1,true,128,scdma,nonVolatile
You will notice that for each docsIfModIndex in the table there are 4-5 rows, this is because this table also has a secondary index, which is docsIfCmtsModIntervalUsageCode and this is where it gets a little tricky, if you are using a TDMA channel (docsis 1.x) you want to look for the longData docsIfCmtsModIntervalUsageCode (6), as this determines the modulation that Customer data uses to traverse the network, if you are using a ATDMA channel (docsis 2.0+) you will want to look at the advPhyLongData (8) row.
so now that you know what rows you need you can just grab the individual value from that row instead of the whole table
// for TDMA channels docsIfCmtsModIntervalUsageCode == longData
snmpget -v2c -c [comm] [ip] DOCS-IF-MIB::docsIfCmtsModType.[docsIfCmtsModIndex].6
// for ATDMA channel docsIfCmtsModIntervalUsageCode == advPhyLongData
snmpget -v2c -c [comm] [ip] DOCS-IF-MIB::docsIfCmtsModType.[docsIfCmtsModIndex].8