本站首页    管理页面    写新日志    退出


«October 2025»
1234
567891011
12131415161718
19202122232425
262728293031


 公告


后其身而身先,外其身而身存。以其无私,故能成其私。


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:火页的窝
日志总数:84
评论数量:180
留言数量:36
访问次数:618932
建立时间:2006年3月14日




[P2P技术]jxta shell 命令详解(陈凌晖)
科学研究

火页 发表于 2006/5/9 14:29:20

通过shell命令寻求帮助 Man命令是JXTA shell最主要的帮助系统,man命令的使用方法是: JXTA> man <commandName> 例如,输入命令: JXTA> man Shell 显示Shell有关的帮助内容。 发现其他对等点 Peers命令是用于发现其他对等节点的。在没有输入选项的情况下,peers命令只显示先前发现的对等体列表,并没有执行远程发现。 在第一次运行peers命令时,将显示本地对等点和先前注册的集合点对等体: JXTA> peers peer0: name = JXTA.CRG 123:9701/9700 peer1: name =airclh 想要发现其他节点,远程发现必须通过选项-r执行。命令是异步运行的,其会马上返回一个提示” peer discovery message sent”,而不是等待完成对等点发现。Peers命令能够被重复执行多次以列出新发现的对等体。根据网络内在结构不同,对等体发现可以是即时的,也可能会花费几分钟时间。Peers命令还有其他选项: -p peerid 发现位于给定位置的对等体。 -r 使用远程传播发现对等体。 -l 以16进制字符串的形式显示对等体ID -a 指定一个属性名来限制发现仅针对具有给定属性名的那些对等体 -v 指定一个属性值来限制发现只针对这样的对等体 -n 将单个对等体所返回响应的数量限制为n -f 刷新对等体通告的本地缓存 发现其他对等体组 groups命令用于发现对等体组。在没有输入选项的情况下,groups命令只显示先前发现的,保存在本地的对等体组,不会执行远程发现。 远程发现其他对等体组的操作必须通过-r选项。命令是异步的运行方式,它立刻返回一句话“group discovery message sent”,而不会等待发现新的对等组。 JXTA> groups -r group discovery message sent JXTA> 就像peers命令一样,groups命令能够执行若干次,以列出所有新发现的对等体组。 JXTA> groups group0: name = NetPeerGroup group1: name = kaja group2: name = dailupGrp group3: name = frog101 group4: name = stevesgroup group5: name = ice group6: name = steve group7: name = raelity JXTA> Peers命令还有其他选项: -p peerid 在给定对等体位置发现组。 -r 通过传播发现组。 -l 以16进制字符串的形式显示所有已知组的ID -a 指定一个属性名来限制发现。对等组必须包含一个已给名称的属性。 -v 指定一个属性值来限制发现。对等组必须包括一个已给值的属性。此选项与-a选项联合使用。 -n 将单个对等体的响应数量限制为n -f 从本地缓存中清除所有组的通告   加入或是创建一个组 Join命令用于加入一个对等体组。在没有选项的情况下,join命令列出对等体已经加入的对等组。一个对等体可以加入任意多的对等组。 要想加入对等组,对等体必须先发现对等组。使用groups命令显示已发现的对等组。在上面groups命令的例子中,group4是一个Shell环境变量,它包含了关于stevesgroup组的相关信息。输入命令join,并在后加-d选项,该选项标明在环境变量group4中包含的关于已发现对等组的信息。 JXTA>join -d group4 clh – Enter the identity you want to use for group ‘stevesgroup’ Identity : clh JXTA> 当加入一个对等组时,对等组成员服务将要求对等体通过有效的身份验证自己。身份名实际上就是一个对等体登陆对等组的用户名。 Join命令的其他选项包括: -r 对等体将充当该组的汇聚对等体 -c credential 指定加入对等组时所用的证书 -d adv 加入给定对等组通告所表示的对等组 name 加入给定名称的对等组 创建一个对等组的jxta shell命令如下: JXTA>importfile -f groupadv groupadv JXTA>mygroupadv = mkadv -g groupadv JXTA>mygroup = mkpgrp -d mygroupadv 注意,由于mkadv命令是根据存储在shell环境变量中的一个文档来创建一个对等组或管道通告,因此必须先使用importfile命令将外部文件groupadv导入到存储在环境变量中的一个结构化文档对象groupadv中。这里我提供一个对等组通告的例子: <?xml version="1.0"?> <!DOCTYPE jxta:PGA> <jxta:PGA xmlns:jxta="http://jxta.org">   <GID>    urn:jxta:uuid-AAA122616461AAAAAAA124615032503302   </GID>   <MSID>    urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000010306   </MSID>   <Name>    JPDA_ROOT_GROUP   </Name>   <Desc>    Root application group   </Desc> </jxta:PGA> mkadv命令的-g选项指定创建一个对等组通告,-p选项指定创建一个管道通告。 mkpgrp命令用于使用提供的对等组通告创建一个新的对等组。 此时使用groups命令显示缓存中对等组信息: JXTA>groups group0: name = NetPeerGroup group1: name = groupadv 使用join命令加入新创建的对等组: JXTA>join -d group1 Enter the identity you want to use when joining this peergroup (nobody) 1Identity : clh 再使用whoami命令显示节点所在对等组信息: JXTA>whoami -g <PeerGroup>groupadv</PeerGroup> <Keywords>dreamsta-lzcd74</Keywords> <PeerGroupId>jxta://CCD7CD9A56CD432A8DCEB28F79700CB7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201</PeerGroupId> <Service>jxta.service.resolver</Service> <Service>jxta.service.membership</Service> <Service>jxta.service.rendezvous</Service> <Service>jxta.service.discovery</Service> <Service>jxta.service.pipe</Service> <Service>jxta.service.peerinfo</Service> JXTA> 与其他对等节点通信 talk命令实现了一个简单的即时消息命令,使两个远程对等体上的两个用户能够更换消息。消息显示在shell的stdout上。 要想使用talk命令,用户必须注册、登陆再发送消息。操作步骤如下所示: 1、通过talk -register <username>命令注册。这个命令为该用户创建了一个talk通告。此步骤只能在用户用talk命令第一次进行注册时完成。像所有的通告一样,此talk通告也将缓存,以便重启后仍然能够保持。 选项secure可以建立一个安全的talk区 选项propagate可建立一个聊天室风格的talk区 2、登陆命令是talk -login <username>。该命令使用户登陆到talk服务并启动一个后台监听程序。登陆命令在每次对等体重起时都要执行。 3、通过talk -u <myusername> <destusername>命令,用户就可以与另一用户对话。这个命令将提示用户输入想要发送的消息: JXTA>talk -u moi mike          talk is connected to user mike          Type your message. To exit, type '.' at begining of line 想要停止接收talk消息,用户可以通过输入talk -logout <username>命令来停止talk后台监听程序。  


阅读全文(5262) | 回复(2) | 编辑 | 精华
 


求教jxta问题
科学研究

yaya(游客)发表评论于2007/10/25 20:40:43

我输入man后出现如下的信息,应该是没问题吧,我是第一天学,不懂,请指教,谢谢了! The following commands are available: Shell                                  JXTA Shell command interpretercat                                    Concatenate and display a Shell objectchpgrp                                 Change the current peer groupclear                                  Clear the shell's screendumpcm                                 Dump the content of the local cache (CM)env                                    Display environment variablesexit                                   Exit the Shellexportfile                             Export enviroment variable to an external fileflush                                  flush a jxta advertisementget                                    Get data from a pipe messagegrep                                   Search for matching patternsgroups                                 Discover peer groupshelp                                   To access help pages use the 'man' command.history                                No description available for this ShellAppimportfile                             Import an external fileinfo                                   display info about an jxta advertisementinstjar                                Installs jar-files containing additional Shell commandsjoin                                   Instantiate and join peer groupkdb                                    a JXTA J2SE debuggerleave                                  Resign from and optionally stop a peer grouplog4j                                  Display and optionally adjust log4j levelslogin                                  Authenticate with the group's membership service.man                                    An on-line help command that displays information about a specific Shell commandmem                                    Display memory informationmkadv                                  Make an advertisement from a documentmkmsg                                  Make a pipe messagemkpipe                                 Create a pipemore                                   Page through a Shell object or from standard input.newpgrp                                Create a new peer group advertisementnewpipe                                Create a new pipe advertisment peerconfig                             Force Peer Reconfigurationpeerinfo                               Get information about peerspeers                                  Discover peerspse.certs                              Display the certificates contained in the current group's PSE Membershippse.createkey                          Creates a key in the PSE key storepse.dumpcred                           Dumps a credential.pse.dupkey                             Creates a key in the PSE key storepse.erase                              Erases a key or certificate from the PSE key storepse.importcert                         Imports a trusted certificate chain.pse.keys                               Display the keys contained in the current group's PSE Membershippse.newcsr                             Generates certificate signing request document.pse.signcsr                            Signs a certificate signing requestpublish                                Publish a JXTA advertisementput                                    Put data into a messagerdvcontrol                             Controls rendezvous service behaviourrdvserver                              No description available for this ShellApprdvstatus                              Display information about the rendezvous servicerecv                                   Receive a message from a piperelaystatus                            Display the list of relays and clients connected to this peer.remotepublish                          remote publish a jxta advertisementroute                                  Display information about a peer's route inforsh                                    Connects to a remote JXTA Shellrshd                                   Remote JXTA Shell Deamon# man - Exception in command : rshd.RemoteShellSessionjava.lang.reflect.UndeclaredThrowableException at net.jxta.impl.shell.ShellCmds.getInstance(ShellCmds.java:405) at net.jxta.impl.shell.ShellApp.loadApp(ShellApp.java:634) at net.jxta.impl.shell.bin.man.man.printDescription(man.java:174) at net.jxta.impl.shell.bin.man.man.selfHelp(man.java:209) at net.jxta.impl.shell.bin.man.man.startApp(man.java:105) at net.jxta.impl.shell.ShellApp.exec(ShellApp.java:706) at net.jxta.impl.shell.bin.Shell.Shell.processCmd(Shell.java:755) at net.jxta.impl.shell.bin.Shell.Shell.processPipeCmd(Shell.java:871) at net.jxta.impl.shell.bin.Shell.Shell.processMultipleCmd(Shell.java:778) at net.jxta.impl.shell.bin.Shell.Shell.runShell(Shell.java:920) at net.jxta.impl.shell.bin.Shell.Shell.run(Shell.java:187) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.InstantiationException: net.jxta.impl.shell.bin.rshd.RemoteShellSession at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at net.jxta.impl.shell.ShellCmds.getInstance(ShellCmds.java:401) ... 11 more search                                 Discover jxta advertisementssend                                   Send a message into a pipeset                                    Set an environment variablesftp                                   Send a file to another peershare                                  Share an advertisementsleep                                  Sleep for a specified amount of millisecondstalk                                   Talk to another peertransports                             Display information about the message transports available in the current groupuninstjar                              Uninstalls jar-files previously installed with 'instjar'unset                                  Removes an environment variableversion                                Display the version number of this Shell instance.wc                                     Count the number of lines, words, and chars in an objectwho                                    Display credential informationwhoami                                 Display information about a peer or peergroupxfer                                   Send a file to another peer 以下为blog主人的回复:可以用  


个人主页 | 引用回复 | 主人回复 | 返回 | 编辑 | 删除
 


回复:jxta shell 命令详解(陈凌晖)
科学研究

QQ 489636876(游客)发表评论于2007/10/7 15:00:46

很多命令都已经更新了 直接用man命令可查看更新的命令格式

个人主页 | 引用回复 | 主人回复 | 返回 | 编辑 | 删除
 


» 1 »

发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.754 second(s), page refreshed 144809067 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号