show unused blocks and bytes

本文详细介绍了如何使用DBMS_SPACE.SPACE_USAGE函数来分析和报告数据库中表的空间使用情况,包括各区间自由块数量及所占用的字节数,并以可视化方式展示不同空间区间的使用状态。
declare
 l_tabname varchar2(30) := '&1';
 l_fs1_bytes number;
 l_fs2_bytes number;
 l_fs3_bytes number;
 l_fs4_bytes number;
 l_fs1_blocks number;
 l_fs2_blocks number;
 l_fs3_blocks number;
 l_fs4_blocks number;
 l_full_bytes number;
 l_full_blocks number;
 l_unformatted_bytes number;
 l_unformatted_blocks number;
 begin
 dbms_space.space_usage(
 segment_owner => user,
 segment_name => l_tabname,
 segment_type => 'TABLE',
 fs1_bytes => l_fs1_bytes,
 fs1_blocks => l_fs1_blocks,
 fs2_bytes => l_fs2_bytes,
 fs2_blocks => l_fs2_blocks,
 fs3_bytes => l_fs3_bytes,
 fs3_blocks => l_fs3_blocks,
 fs4_bytes => l_fs4_bytes,
 fs4_blocks => l_fs4_blocks,
 full_bytes => l_full_bytes,
 full_blocks => l_full_blocks,
 unformatted_blocks => l_unformatted_blocks,
 unformatted_bytes => l_unformatted_bytes
 );
 dbms_output.put_line('0-25% Free = '||l_fs1_blocks||' Bytes = '||l_fs1_bytes);
 dbms_output.put_line('25-50% Free = '||l_fs2_blocks||' Bytes = '||l_fs2_bytes);
 dbms_output.put_line('50-75% Free = '||l_fs3_blocks||' Bytes = '||l_fs3_bytes);
 dbms_output.put_line('75-100% Free = '||l_fs4_blocks||' Bytes = '||l_fs4_bytes);
 dbms_output.put_line('Full Blocks = '||l_full_blocks||' Bytes = '||l_full_bytes);
 end;
IPL gf1a3b50 D-0 *** Warning - readenv() failed, using default environment ENV overdrive not found ! BIST-128MB: OK IPL_CUST gf1a3b50 D-0 U-Boot 2021.10 (Sep 30 2025 - 11:06:17 +0800) SoC: SigmaStar iford Model: IFORD Version: I###g7993bdf DRAM: 64 MiB WDT: Not found! Flash: SPI 54M [FLASH] Device id is 0xa1 0x40 0x18 [SPINOR] ReadData = 0x6b [SPINOR] Dummy = 0x8 [SPINOR] pageProgram = 0x2 [FLASH] BDMA mode [SPINOR] complement = 0x0 [SPINOR] top/buttom = 0x0 [SPINOR] blocks = 0x0 [SPINOR] SRP0 = 0x0 [SPINOR] SRP1 = 0x0 [FLASH] End flash init. spi clk already initialized mtd .name = nor0, .size = 0x01000000 (16MiB) .erasesize = 0x00001000 . Detected nor0 with total size 16 MiB 16 MiB MMC: Fail to get pad(0x0) ip(0x0_8) form padmux ! Fail to get pad(0x0) ip(0x1_8) form padmux ! MSC: 1, MSC: 0 Loading Environment from SPIFlash... ENV: offset = 0x4f000 size = 0x1000 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: MAC Address 00:30:1B:BA:02:DB Auto-Negotiation... Link Status Speed:100 Full-duplex:1 sstar_emac device 0 offset 0x50000, size 0x188 SF: 392 bytes @ 0x50000 Read: OK show speed: 127 KiB/s device 0 offset 0x50000, size 0x480 SF: 1152 bytes @ 0x50000 Read: OK show speed: 375 KiB/s device 0 offset 0x52000, size 0x480 SF: 1152 bytes @ 0x52000 Read: OK show speed: 375 KiB/s INFO:read_partition_table_to_manager [267] pt table is ok,read it finish Hit any key to stop autoboot: 0 partition factory_boot skip,not check partition pt_table skip,not check partition pt_table_restore skip,not check device 0 offset 0x54000, size 0x27a44 SF: 162372 bytes @ 0x54000 Read: OK show speed: 17618 KiB/s check partition uboot from 0x54000 to 0x27a44.....ok partition factory_info skip,not check device 0 offset 0x7d000, size 0xc230 SF: 49712 bytes @ 0x7d000 Read: OK show speed: 9709 KiB/s device 0 offset 0x7d000, size 0x10000 SF: 65536 bytes @ 0x7d000 Read: OK show speed: 10666 KiB/s check ex_pack isp from 0x7d000 to.....ok partition uc skip,not check partition uc_back skip,not check device 0 offset 0xad000, size 0x1fc2e4 SF: 2081508 bytes @ 0xad000 Read: OK show speed: 24199 KiB/s check partition kernel_linux from 0xad000 to 0x1fc2e4.....ok device 0 offset 0x2fd000, size 0x400000 SF: 4194304 bytes @ 0x2fd000 Read: OK show speed: 24526 KiB/s device 0 offset 0x6fd000, size 0x400000 SF: 4194304 bytes @ 0x6fd000 Read: OK show speed: 24526 KiB/s device 0 offset 0xafd000, size 0x400000 SF: 4194304 bytes @ 0xafd000 Read: OK show speed: 24526 KiB/s check partition rootfs_squashfs from 0x2fd000 to 0xc00000.....ok INFO:pmBoardTask [246] Firmware check pass! device 0 offset 0x54000, size 0x27a44 SF: 162372 bytes @ 0x54000 Read: OK show speed: 15856 KiB/s [XZ] !!!reserved 0x22000000 length=0x 1000000 for xz!! XZ params: in_addr 0x21000040, in_size 0x30000, out_addr 0x220a0000, out_size 0x70000 XZ: uncompress ret 7, size = 458752 normal_boot: b0 0 0 ea 14 f0 9f e5; 45 4d 0 0 0 0 0 0 ===> BOARD_EXITFactoryBoot:117 ===> BOARD_EXITFactoryBoot:119 ===> BOARD_EXITFactoryBoot:123 ## Starting application at 0x220A0000 ... U-Boot 2021.10 (Sep 30 2025 - 11:05:54 +0800) SoC: SigmaStar iford Model: IFORD Version: I###g7993bdf DRAM: 64 MiB WDT: Not found! Flash: SPI 54M [FLASH] Device id is 0xa1 0x40 0x18 [SPINOR] ReadData = 0x6b [SPINOR] Dummy = 0x8 [SPINOR] pageProgram = 0x2 [FLASH] BDMA mode [SPINOR] complement = 0x0 [SPINOR] top/buttom = 0x0 [SPINOR] blocks = 0x0 [SPINOR] SRP0 = 0x0 [SPINOR] SRP1 = 0x0 [FLASH] End flash init. spi clk already initialized mtd .name = nor0, .size = 0x01000000 (16MiB) .erasesize = 0x00001000 . Detected nor0 with total size 16 MiB 16 MiB MMC: Fail to get pad(0x0) ip(0x0_8) form padmux ! Fail to get pad(0x0) ip(0x1_8) form padmux ! MSC: 1, MSC: 0 Loading Environment from SPIFlash... ENV: offset = 0x4f000 size = 0x1000 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: MAC Address 00:30:1B:BA:02:DB Auto-Negotiation... Link Status Speed:100 Full-duplex:1 sstar_emac device 0 offset 0x50000, size 0x188 SF: 392 bytes @ 0x50000 Read: OK show speed: 127 KiB/s device 0 offset 0x50000, size 0x480 SF: 1152 bytes @ 0x50000 Read: OK show speed: 375 KiB/s device 0 offset 0x52000, size 0x480 SF: 1152 bytes @ 0x52000 Read: OK show speed: 375 KiB/s INFO:read_partition_table_to_manager [267] pt table is ok,read it finish device 0 offset 0xad000, size 0x1fc2e4 SF: 2081508 bytes @ 0xad000 Read: OK show speed: 23914 KiB/s Hit any key to stop autoboot: 0 ## Booting kernel from Legacy Image at 21000000 ... Image Name: MVX4##I###g7993bdfKL_LX510##[BR: Image Type: ARM Linux Kernel Image (lzma compressed) Data Size: 2081444 Bytes = 2 MiB Load Address: 20008000 Entry Point: 20008000 Verifying Checksum ... OK Uncompressing Kernel Image [XZ] !!!reserved 0x22000000 length=0x 1000000 for xz!! XZ: uncompressed size=0x438e40, ret=7 Starting kernel ... early_atags_to_fdt() success Booting Linux on physical CPU 0x0 Linux version 5.10.117 (tp@ubuntu) (arm-sigmastar-linux-uclibcgnueabihf-9.1.0-gcc (crosstool-NG 1.24.0) 9.1.0, GNU ld (crosstool-NG 1.24.0) 2.32) #2 PREEMPT Tue Sep 30 11:08:14 CST 2025 CPU: ARMv7 Processor [411fd010] revision 0 (ARMv7), cr=50c5383d CPU: div instructions available: patching division code CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache early_atags_to_fdt() success OF: fdt: Machine model: IFORD SSC029C-S01A LXmem is 0x4000000 PHYS_OFFSET is 0x20000000 Add mem start 0x20000000 size 0x4000000!!!! LX_MEM = 0x20000000, 0x4000000 LX_MEM2 = 0x0, 0x0 LX_MEM3 = 0x0, 0x0 MMU_MEM = 0x0, 0x0 EMAC_LEN= 0x0 DRAM_LEN= 0x0 Memory policy: Data cache writeback Reserved memory: created CMA memory pool at 0x23000000, size 16 MiB OF: reserved mem: initialized node cma0, compatible id shared-dma-pool no any mmap reserved deal_with_reserve_mma_heap memblock_reserve success mma_config[0].reserved_start= 0x21960000 size:16a0000 Zone ranges: Normal [mem 0x0000000020000000-0x0000000023ffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000020000000-0x000000002195ffff] node 0: [mem 0x0000000023000000-0x0000000023ffffff] Initmem setup node 0 [mem 0x0000000020000000-0x0000000023ffffff] CPU: All CPU(s) started in SVC mode. Built 1 zonelists, mobility grouping on. Total pages: 10464 Kernel command line: console=ttyS0,115200n8r androidboot.console=ttyS0 root=/dev/mtdblock10 rootfstype=squashfs noinitrd init=/etc/preinit LX_MEM=0x4000000 mma_heap=mma_heap_name0,miu=0,sz=0x16a0000 mma_memblock_remove=1 Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear) mem auto-init: stack:off, heap alloc:off, heap free:off Memory: 20880K/42368K available (2496K kernel code, 403K rwdata, 1136K rodata, 120K init, 125K bss, 5104K reserved, 16384K cma-reserved) SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 rcu: Preemptible hierarchical RCU implementation. Trampoline variant of Tasks RCU enabled. rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 GICv3: 192 SPIs implemented GICv3: 0 Extended SPIs implemented GICv3: Distributor has no Range Selector support GICv3: 16 PPIs implemented GICv3: CPU0: found redistributor 0 region 0:0x16040000 sstar_init_main_intc: np->name=sstar_main_intc, parent=gic sstar_pm_main_init: np->name=sstar_pm_main_intc, parent=sstar_main_intc sstar_pm_gpi_init: np->name=sstar_pm_gpi_intc, parent=sstar_main_intc sstar_gpi_init: np->name=sstar_gpi_intc, parent=sstar_main_intc random: get_random_bytes called from start_kernel+0x1bb/0x308 with crng_init=0 arch_timer: cp15 timer(s) running at 6.00MHz (virt). clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1623fa770, max_idle_ns: 440795202238 ns sched_clock: 56 bits at 6MHz, resolution 166ns, wraps every 4398046511055ns Switching to timer-based delay loop, resolution 166ns printk: console [ttyS0] enabled Calibrating delay loop (skipped), value calculated using timer frequency.. 12.00 BogoMIPS (lpj=60000) pid_max: default: 4096 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) CPU: Testing write buffer coherency: ok Setting up static identity map for 0x20008200 - 0x20008254 rcu: Hierarchical SRCU implementation. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 40 variant 1 rev 2 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 16 (order: -4, 448 bytes, linear) NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations Version : MVX4##I###g7993bdfKL_LX510##[BR:develop_master_1.7]#XVM irq: IRQ35: trimming hierarchy from :soc:sstar_main_intc irq: IRQ36: trimming hierarchy from :soc:sstar_main_intc irq: IRQ37: trimming hierarchy from :soc:sstar_main_intc irq: IRQ38: trimming hierarchy from :soc:sstar_main_intc GPIO: probe end [Padmux]reset PAD48(reg 0x3f00:52; mask0x300) t0 I2C0_MODE_4 (org: PM_SDIO_MODE_3) Do qos-initialize [sstar_update_dq_init] clocksource: Switched to clocksource arch_sys_counter NET: Registered protocol family 2 IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 6144 bytes, linear) TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) TCP bind hash table entries: 1024 (order: 2, 20480 bytes, linear) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 128 (order: 0, 6144 bytes, linear) UDP-Lite hash table entries: 128 (order: 0, 6144 bytes, linear) NET: Registered protocol family 1 Initialise system trusted keyrings workingset: timestamp_bits=30 max_order=14 bucket_order=0 squashfs: version 4.0 (2009/01/31) Phillip Lougher jffs2: version 2.2. © 2001-2006 Red Hat, Inc. Key type asymmetric registered Asymmetric key parser 'x509' registered io scheduler mq-deadline registered zram: Added device: zram0 i2c /dev entrigs driver failed to get uart clk_mcu failed to get uart clk_mcu please set rtc timer (hwclock -w) sstar,rtcpwc 1f006800.rtcpwc: registered as rtc0 sstar,rtcpwc 1f006800.rtcpwc: setting system clock to 1970-01-01T00:00:00 UTC (0) [Padmux]reset PAD48(reg 0x3f00:5; mask0x8) t0 I2C0_MODE_4 (org: GPIO_MODE) [Padmux]reset PAD49(reg 0x3f00:6; mask0x8) t0 I2C0_MODE_4 (org: GPIO_MODE) [Padmux]reset PAD3(reg 0x103e00:3; mask0x8) t0 I2C1_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD0(reg 0x103e00:0; mask0x8) t0 I2C1_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD65(reg 0x3f00:16; mask0x8) t0 PM_I2CM0_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD66(reg 0x3f00:17; mask0x8) t0 PM_I2CM0_MODE_1 (org: GPIO_MODE) cryptodev: driver 1.10(a1e738a) loaded. ms_cpufreq_init 502 SIDD: 0x62 OSC:0xea ms_cpufreq_init 503 SIDD Thres: 0x0 OSC Thres:0x978 random: fast init done random: crng init done [ms_cpufreq_init] Current clk=800000048 SPI 54M [FLASH] Device id is 0xa1 0x40 0x18 [SPINOR] ReadData = 0x6b [SPINOR] Dummy = 0x8 [SPINOR] pageProgram = 0x2 [FLASH] BDMA mode [SPINOR] complement = 0x0 [SPINOR] top/buttom = 0x0 [SPINOR] blocks = 0x0 [SPINOR] SRP0 = 0x0 [SPINOR] SRP1 = 0x0 [FLASH] End flash init. sstar_spinor_probe: 7mtd .name = nor0, .size = 0x01000000 (16MiB) .erasesize = 0x00001000 .numeraseregions = 0 NET: Registered protocol family 10 Segment Routing with IPv6 mip6: Mobile IPv6 sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver NET: Registered protocol family 17 [sstar_pm_init] MIU0_BASE=20000000 [sstar_pm_init] resume_entry=0x2000f8cc, suspend_imi_vbase=0XC4876000 Loading compiled-in X.509 certificates INFO pm_part_init_device [89] found driver sstar-norflash INFO pm_part_init_device [114] mtd nor0 will use same node INFO pm_part_init_device [118] flash device soc:norflash0,update device node INFO create_part_to_mtd [49] mtd master is already register,only do partition Deleting MTD partitions on "nor0": clk: Not disabling unused clocks /dev/root: Can't open blockdev VFS: Cannot open root device "mtdblock10" or unknown-block(0,0): error -6 Please append a correct "root=" boot option; here are the available partitions: 1f00 16384 mtdblock0 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- 分析程序,进入kernel了吗
最新发布
10-01
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值